Skip to content

Instantly share code, notes, and snippets.

@podhmo
Created March 31, 2021 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save podhmo/541d754768d55a5ce9e5a936946cb4a9 to your computer and use it in GitHub Desktop.
Save podhmo/541d754768d55a5ce9e5a936946cb4a9 to your computer and use it in GitHub Desktop.
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Outputs:
greeting = "hello foo from us-west-1a"
json_result = "{\"age\":20,\"name\":\"foo\"}"
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Outputs:
greeting = "hello foo from xxx"
json_result = "{\"age\":20,\"name\":\"foo\"}"
variable "aws_region" {
default = "us-west-1a"
}
locals {
person = {
name = "foo"
age = 20
}
}
output "json_result" {
value = jsonencode(local.person)
}
output "greeting" {
value = "hello ${local.person.name} from ${var.aws_region}"
}
00:
terraform apply -auto-approve
terraform show
01:
terraform output
02:
terraform apply -auto-approve -var='aws_region="xxx"'
fmt:
terraform fmt
init:
terraform init
.PHONY: init fmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment