Skip to content

Commit

Permalink
refactor: Add a minimal example of a project with parameters (#331)
Browse files Browse the repository at this point in the history
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">
  • Loading branch information
bryphe-coder committed Feb 21, 2022
1 parent 3b57619 commit 59ee22d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/project-with-parameters/main.tf
Original file line number Diff line number Diff line change
@@ -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}"
}

0 comments on commit 59ee22d

Please sign in to comment.