Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 2.33 KB

File metadata and controls

44 lines (36 loc) · 2.33 KB
page_title subcategory description
coder_workspace Data Source - terraform-provider-coder
Use this data source to get information for the active workspace build.

coder_workspace (Data Source)

Use this data source to get information for the active workspace build.

Example Usage

data "coder_workspace" "dev" {
}

resource "kubernetes_pod" "dev" {
  count = data.coder_workspace.dev.transition == "start" ? 1 : 0
}

Schema

Read-Only

  • access_port (Number) The access port of the Coder deployment provisioning this workspace.
  • access_url (String) The access URL of the Coder deployment provisioning this workspace.
  • id (String) UUID of the workspace.
  • name (String) Name of the workspace.
  • owner (String, Deprecated: Use coder_workspace_owner.name instead.) Username of the workspace owner.
  • owner_email (String, Deprecated: Use coder_workspace_owner.email instead.) Email address of the workspace owner.
  • owner_groups (List of String, Deprecated: Use coder_workspace_owner.groups instead.) List of groups the workspace owner belongs to.
  • owner_id (String, Deprecated: Use coder_workspace_owner.id instead.) UUID of the workspace owner.
  • owner_name (String, Deprecated: Use coder_workspace_owner.full_name instead.) Name of the workspace owner.
  • owner_oidc_access_token (String, Deprecated: Use coder_workspace_owner.oidc_access_token instead.) A valid OpenID Connect access token of the workspace owner. This is only available if the workspace owner authenticated with OpenID Connect. If a valid token cannot be obtained, this value will be an empty string.
  • owner_session_token (String, Deprecated: Use coder_workspace_owner.session_token instead.) Session token for authenticating with a Coder deployment. It is regenerated everytime a workspace is started.
  • start_count (Number) A computed count based on transition state. If start, count will equal 1.
  • template_id (String) ID of the workspace's template.
  • template_name (String) Name of the workspace's template.
  • template_version (String) Version of the workspace's template.
  • transition (String) Either start or stop. Use this to start/stop resources with count.