mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
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">
This commit is contained in:
11
examples/project-with-parameters/main.tf
Normal file
11
examples/project-with-parameters/main.tf
Normal file
@ -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}"
|
||||
}
|
Reference in New Issue
Block a user