Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/resources/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ When importing, the ID supplied can be either a template UUID retrieved via the
// Provider populated from environment variables
provider "coderd" {}

// Get the commit SHA of the configuration's git repository
variable "TFC_CONFIGURATION_VERSION_GIT_COMMIT_SHA" {
// Can be populated using an environment variable, or an external datasource script
variable "COMMIT_SHA" {
type = string
}

Expand All @@ -38,12 +38,12 @@ resource "coderd_template" "ubuntu-main" {
description = "The main template for developing on Ubuntu."
versions = [
{
name = "stable-${var.TFC_CONFIGURATION_VERSION_GIT_COMMIT_SHA}"
name = "stable-${var.COMMIT_SHA}"
description = "The stable version of the template."
directory = "./stable-template"
},
{
name = "staging-${var.TFC_CONFIGURATION_VERSION_GIT_COMMIT_SHA}"
name = "staging-${var.COMMIT_SHA}"
description = "The staging version of the template."
directory = "./staging-template"
}
Expand Down
8 changes: 4 additions & 4 deletions examples/resources/coderd_template/resource.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Provider populated from environment variables
provider "coderd" {}

// Get the commit SHA of the configuration's git repository
variable "TFC_CONFIGURATION_VERSION_GIT_COMMIT_SHA" {
// Can be populated using an environment variable, or an external datasource script
variable "COMMIT_SHA" {
type = string
}

Expand All @@ -17,12 +17,12 @@ resource "coderd_template" "ubuntu-main" {
description = "The main template for developing on Ubuntu."
versions = [
{
name = "stable-${var.TFC_CONFIGURATION_VERSION_GIT_COMMIT_SHA}"
name = "stable-${var.COMMIT_SHA}"
description = "The stable version of the template."
directory = "./stable-template"
},
{
name = "staging-${var.TFC_CONFIGURATION_VERSION_GIT_COMMIT_SHA}"
name = "staging-${var.COMMIT_SHA}"
description = "The staging version of the template."
directory = "./staging-template"
}
Expand Down
Loading