From b8f4ab9230f76bc32fd31311e372dbe19b8b5bc2 Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Fri, 18 Oct 2024 03:34:14 +0000 Subject: [PATCH] docs: replace example that requires TFC --- docs/resources/template.md | 8 ++++---- examples/resources/coderd_template/resource.tf | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/resources/template.md b/docs/resources/template.md index cacd1b7..81edc41 100644 --- a/docs/resources/template.md +++ b/docs/resources/template.md @@ -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 } @@ -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" } diff --git a/examples/resources/coderd_template/resource.tf b/examples/resources/coderd_template/resource.tf index 3cbc8fe..e644d6e 100644 --- a/examples/resources/coderd_template/resource.tf +++ b/examples/resources/coderd_template/resource.tf @@ -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 } @@ -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" }