From 59ee22d3683dc7be8b20dc3d0ebfbe84fc2dd10f Mon Sep 17 00:00:00 2001 From: Bryan Date: Mon, 21 Feb 2022 09:36:30 -0800 Subject: [PATCH] refactor: Add a minimal example of a project with parameters (#331) Thought it'd be helpful to show a bare-bones example of a project with a parameter, along with references to the Terraform docs so developers can learn about more interesting variable types (and ways to leverage them in expressions). With this project, we can go through the `projects create` flow of setting a parameter: Screen Shot 2022-02-18 at 7 53 07 PM --- examples/project-with-parameters/main.tf | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 examples/project-with-parameters/main.tf diff --git a/examples/project-with-parameters/main.tf b/examples/project-with-parameters/main.tf new file mode 100644 index 0000000000..aeae497d30 --- /dev/null +++ b/examples/project-with-parameters/main.tf @@ -0,0 +1,11 @@ +# For interesting types of variables, check out the terraform docs: +# https://www.terraform.io/language/values/variables#declaring-an-input-variable +variable "message" { + type = string +} + +# And refer to the docs on using expressions to make use of variables: +# https://www.terraform.io/language/expressions/strings#interpolation +output "hello_provisioner" { + value = "Hello, provisioner: ${var.message}" +}