Skip to content

Commit 64ead25

Browse files
committed
Remove "owner_name" field
1 parent 2989703 commit 64ead25

File tree

3 files changed

+0
-14
lines changed

3 files changed

+0
-14
lines changed

docs/data-sources/workspace.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ resource "kubernetes_pod" "dev" {
3030
- `id` (String) UUID of the workspace.
3131
- `name` (String) Name of the workspace.
3232
- `owner` (String) Username of the workspace owner.
33-
- `owner_name` (String) Display-friendly name of the workspace owner (or their username, if a name is not known).
3433
- `owner_email` (String) Email address of the workspace owner.
3534
- `owner_id` (String) UUID of the workspace owner.
3635
- `start_count` (Number) A computed count based on "transition" state. If "start", count will equal 1.

internal/provider/provider.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,6 @@ func New() *schema.Provider {
7676
}
7777
_ = rd.Set("owner", owner)
7878

79-
ownerName := os.Getenv("CODER_WORKSPACE_OWNER_NAME")
80-
if ownerName == "" {
81-
ownerName = owner
82-
}
83-
_ = rd.Set("owner_name", ownerName)
84-
8579
ownerEmail := os.Getenv("CODER_WORKSPACE_OWNER_EMAIL")
8680
_ = rd.Set("owner_email", ownerEmail)
8781

@@ -132,11 +126,6 @@ func New() *schema.Provider {
132126
Computed: true,
133127
Description: "Username of the workspace owner.",
134128
},
135-
"owner_name": {
136-
Type: schema.TypeString,
137-
Computed: true,
138-
Description: "Name of the workspace owner (e.g. for Git commits) if known, otherwise their username.",
139-
},
140129
"owner_email": {
141130
Type: schema.TypeString,
142131
Computed: true,

internal/provider/provider_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ func TestProvider(t *testing.T) {
2020

2121
func TestWorkspace(t *testing.T) {
2222
t.Setenv("CODER_WORKSPACE_OWNER", "owner123")
23-
t.Setenv("CODER_WORKSPACE_OWNER_NAME", "Workspace Owner Jr.")
2423
t.Setenv("CODER_WORKSPACE_OWNER_EMAIL", "[email protected]")
2524

2625
resource.Test(t, resource.TestCase{
@@ -46,7 +45,6 @@ func TestWorkspace(t *testing.T) {
4645
require.NotNil(t, value)
4746
t.Log(value)
4847
require.Equal(t, "owner123", attribs["owner"])
49-
require.Equal(t, "Workspace Owner Jr.", attribs["owner_name"])
5048
require.Equal(t, "[email protected]", attribs["owner_email"])
5149
return nil
5250
},

0 commit comments

Comments
 (0)