Skip to content

refactor: Add terraform example of project with resource #346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 23, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
refactor: Add example of project with resource
  • Loading branch information
bryphe-coder committed Feb 21, 2022
commit 213a2523b919013b10d84ab13621ddf677c4344f
17 changes: 17 additions & 0 deletions examples/project-with-resource/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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
}

# We can use a "null_resource" to test resources without a cloud provider:
# https://www.terraform.io/language/resources/provisioners/null_resource
resource "null_resource" "minimal_resource" {

# Note that Terraform's `provisioner` concept is generally an anti-pattern -
# more info here: https://www.terraform.io/language/resources/provisioners/syntax
# But it's helpful here for testing a resource.
provisioner "local-exec" {
command = "echo ${var.message}"
}
}