Files
coder/examples/project-with-parameters/main.tf
Bryan 59ee22d368 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:
<img width="677" alt="Screen Shot 2022-02-18 at 7 53 07 PM" src="https://user-images.githubusercontent.com/88213859/154785203-ab626268-0e51-48c3-b374-3d49d541042b.png">
2022-02-21 09:36:30 -08:00

12 lines
408 B
HCL

# 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}"
}