Skip to content

Instantly share code, notes, and snippets.

@podhmo
Created Mar 31, 2021
Embed
What would you like to do?
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