diff --git a/docs/data-sources/workspace.md b/docs/data-sources/workspace.md index 77f0e13a..1dc1ffce 100644 --- a/docs/data-sources/workspace.md +++ b/docs/data-sources/workspace.md @@ -31,7 +31,7 @@ resource "kubernetes_pod" "dev" { ### Read-Only - **name** (String) Name of the workspace. +- **owner** (String) Username of the workspace owner. - **transition** (String) Either "start" or "stop". Use this to start/stop resources with "count". -- **username** (String) Username of the workspace owner. diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 65d919c4..dd0bde65 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -65,7 +65,7 @@ func New() *schema.Provider { transition = "start" } rd.Set("transition", transition) - rd.Set("username", os.Getenv("CODER_WORKSPACE_USERNAME")) + rd.Set("owner", os.Getenv("CODER_WORKSPACE_OWNER")) rd.Set("name", os.Getenv("CODER_WORKSPACE_NAME")) return nil }, @@ -75,7 +75,7 @@ func New() *schema.Provider { Computed: true, Description: `Either "start" or "stop". Use this to start/stop resources with "count".`, }, - "username": { + "owner": { Type: schema.TypeString, Computed: true, Description: "Username of the workspace owner.",