coder 2.12.0 published on Tuesday, Oct 21, 2025 by coder
coder.getWorkspace
Use this data source to get information for the active workspace build.
Using getWorkspace
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getWorkspace(opts?: InvokeOptions): Promise<GetWorkspaceResult>
function getWorkspaceOutput(opts?: InvokeOptions): Output<GetWorkspaceResult>def get_workspace(opts: Optional[InvokeOptions] = None) -> GetWorkspaceResult
def get_workspace_output(opts: Optional[InvokeOptions] = None) -> Output[GetWorkspaceResult]func GetWorkspace(ctx *Context, opts ...InvokeOption) (*GetWorkspaceResult, error)
func GetWorkspaceOutput(ctx *Context, opts ...InvokeOption) GetWorkspaceResultOutput> Note: This function is named GetWorkspace in the Go SDK.
public static class GetWorkspace 
{
    public static Task<GetWorkspaceResult> InvokeAsync(InvokeOptions? opts = null)
    public static Output<GetWorkspaceResult> Invoke(InvokeOptions? opts = null)
}public static CompletableFuture<GetWorkspaceResult> getWorkspace(InvokeOptions options)
public static Output<GetWorkspaceResult> getWorkspace(InvokeOptions options)
fn::invoke:
  function: coder:index/getWorkspace:getWorkspace
  arguments:
    # arguments dictionarygetWorkspace Result
The following output properties are available:
- AccessPort double
- The access port of the Coder deployment provisioning this workspace.
- AccessUrl string
- The access URL of the Coder deployment provisioning this workspace. This is the base URL without a trailing slash (e.g., "https://coder.example.com" or "https://coder.example.com:8080").
- Id string
- UUID of the workspace.
- IsPrebuild bool
- Similar to prebuild_count, but a boolean value instead of a count. This is set to true if the workspace is a currently unassigned prebuild. Once the workspace is assigned, this value will be false.
- IsPrebuild boolClaim 
- Indicates whether a prebuilt workspace has just been claimed and this is the first applyafter that occurrence.
- Name string
- Name of the workspace.
- PrebuildCount double
- A computed count, equal to 1 if the workspace is a currently unassigned prebuild. Use this to conditionally act on the status of a prebuild. Actions that do not require user identity can be taken when this value is set to 1. Actions that should only be taken once the workspace has been assigned to a user may be taken when this value is set to 0.
- StartCount double
- A computed count based on transitionstate. Ifstart, count will equal 1.
- TemplateId string
- ID of the workspace's template.
- TemplateName string
- Name of the workspace's template.
- TemplateVersion string
- Version of the workspace's template.
- Transition string
- Either startorstop. Use this to start/stop resources withcount.
- AccessPort float64
- The access port of the Coder deployment provisioning this workspace.
- AccessUrl string
- The access URL of the Coder deployment provisioning this workspace. This is the base URL without a trailing slash (e.g., "https://coder.example.com" or "https://coder.example.com:8080").
- Id string
- UUID of the workspace.
- IsPrebuild bool
- Similar to prebuild_count, but a boolean value instead of a count. This is set to true if the workspace is a currently unassigned prebuild. Once the workspace is assigned, this value will be false.
- IsPrebuild boolClaim 
- Indicates whether a prebuilt workspace has just been claimed and this is the first applyafter that occurrence.
- Name string
- Name of the workspace.
- PrebuildCount float64
- A computed count, equal to 1 if the workspace is a currently unassigned prebuild. Use this to conditionally act on the status of a prebuild. Actions that do not require user identity can be taken when this value is set to 1. Actions that should only be taken once the workspace has been assigned to a user may be taken when this value is set to 0.
- StartCount float64
- A computed count based on transitionstate. Ifstart, count will equal 1.
- TemplateId string
- ID of the workspace's template.
- TemplateName string
- Name of the workspace's template.
- TemplateVersion string
- Version of the workspace's template.
- Transition string
- Either startorstop. Use this to start/stop resources withcount.
- accessPort Double
- The access port of the Coder deployment provisioning this workspace.
- accessUrl String
- The access URL of the Coder deployment provisioning this workspace. This is the base URL without a trailing slash (e.g., "https://coder.example.com" or "https://coder.example.com:8080").
- id String
- UUID of the workspace.
- isPrebuild Boolean
- Similar to prebuild_count, but a boolean value instead of a count. This is set to true if the workspace is a currently unassigned prebuild. Once the workspace is assigned, this value will be false.
- isPrebuild BooleanClaim 
- Indicates whether a prebuilt workspace has just been claimed and this is the first applyafter that occurrence.
- name String
- Name of the workspace.
- prebuildCount Double
- A computed count, equal to 1 if the workspace is a currently unassigned prebuild. Use this to conditionally act on the status of a prebuild. Actions that do not require user identity can be taken when this value is set to 1. Actions that should only be taken once the workspace has been assigned to a user may be taken when this value is set to 0.
- startCount Double
- A computed count based on transitionstate. Ifstart, count will equal 1.
- templateId String
- ID of the workspace's template.
- templateName String
- Name of the workspace's template.
- templateVersion String
- Version of the workspace's template.
- transition String
- Either startorstop. Use this to start/stop resources withcount.
- accessPort number
- The access port of the Coder deployment provisioning this workspace.
- accessUrl string
- The access URL of the Coder deployment provisioning this workspace. This is the base URL without a trailing slash (e.g., "https://coder.example.com" or "https://coder.example.com:8080").
- id string
- UUID of the workspace.
- isPrebuild boolean
- Similar to prebuild_count, but a boolean value instead of a count. This is set to true if the workspace is a currently unassigned prebuild. Once the workspace is assigned, this value will be false.
- isPrebuild booleanClaim 
- Indicates whether a prebuilt workspace has just been claimed and this is the first applyafter that occurrence.
- name string
- Name of the workspace.
- prebuildCount number
- A computed count, equal to 1 if the workspace is a currently unassigned prebuild. Use this to conditionally act on the status of a prebuild. Actions that do not require user identity can be taken when this value is set to 1. Actions that should only be taken once the workspace has been assigned to a user may be taken when this value is set to 0.
- startCount number
- A computed count based on transitionstate. Ifstart, count will equal 1.
- templateId string
- ID of the workspace's template.
- templateName string
- Name of the workspace's template.
- templateVersion string
- Version of the workspace's template.
- transition string
- Either startorstop. Use this to start/stop resources withcount.
- access_port float
- The access port of the Coder deployment provisioning this workspace.
- access_url str
- The access URL of the Coder deployment provisioning this workspace. This is the base URL without a trailing slash (e.g., "https://coder.example.com" or "https://coder.example.com:8080").
- id str
- UUID of the workspace.
- is_prebuild bool
- Similar to prebuild_count, but a boolean value instead of a count. This is set to true if the workspace is a currently unassigned prebuild. Once the workspace is assigned, this value will be false.
- is_prebuild_ boolclaim 
- Indicates whether a prebuilt workspace has just been claimed and this is the first applyafter that occurrence.
- name str
- Name of the workspace.
- prebuild_count float
- A computed count, equal to 1 if the workspace is a currently unassigned prebuild. Use this to conditionally act on the status of a prebuild. Actions that do not require user identity can be taken when this value is set to 1. Actions that should only be taken once the workspace has been assigned to a user may be taken when this value is set to 0.
- start_count float
- A computed count based on transitionstate. Ifstart, count will equal 1.
- template_id str
- ID of the workspace's template.
- template_name str
- Name of the workspace's template.
- template_version str
- Version of the workspace's template.
- transition str
- Either startorstop. Use this to start/stop resources withcount.
- accessPort Number
- The access port of the Coder deployment provisioning this workspace.
- accessUrl String
- The access URL of the Coder deployment provisioning this workspace. This is the base URL without a trailing slash (e.g., "https://coder.example.com" or "https://coder.example.com:8080").
- id String
- UUID of the workspace.
- isPrebuild Boolean
- Similar to prebuild_count, but a boolean value instead of a count. This is set to true if the workspace is a currently unassigned prebuild. Once the workspace is assigned, this value will be false.
- isPrebuild BooleanClaim 
- Indicates whether a prebuilt workspace has just been claimed and this is the first applyafter that occurrence.
- name String
- Name of the workspace.
- prebuildCount Number
- A computed count, equal to 1 if the workspace is a currently unassigned prebuild. Use this to conditionally act on the status of a prebuild. Actions that do not require user identity can be taken when this value is set to 1. Actions that should only be taken once the workspace has been assigned to a user may be taken when this value is set to 0.
- startCount Number
- A computed count based on transitionstate. Ifstart, count will equal 1.
- templateId String
- ID of the workspace's template.
- templateName String
- Name of the workspace's template.
- templateVersion String
- Version of the workspace's template.
- transition String
- Either startorstop. Use this to start/stop resources withcount.
Package Details
- Repository
- coder coder/terraform-provider-coder
- License
- Notes
- This Pulumi package is based on the coderTerraform Provider.
