Skip to content

Expose template name and ID via a Terraform data source #9149

Closed
@bpmct

Description

@bpmct

Background

We have a data.coder_workspace data source that gives Terraform context about the workspace being built:

  • Workspace name
  • Workspace owner
  • Deployment URL

Context

There are some cases where the admin may want Terraform to be aware of the template name being built, primarily for labeling for cost controls or analytics. While this can be hardcoded per-template in small deployments, it does not scale or work well when a large amount of the template is managed via a Terraform module

Proposal

Extend the coder_workspace data source and add the two read-only properties:

  • template_name
  • template_id

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions