opentofu/terraform/test-fixtures/apply-vars/main.tf
Mitchell Hashimoto 038cca291e config: HCL loader
2014-08-11 09:58:53 -07:00

24 lines
358 B
HCL

variable "amis" {
default = {
us-east-1 = "foo"
us-west-2 = "foo"
}
}
variable "bar" {
default = "baz"
}
variable "foo" {}
resource "aws_instance" "foo" {
num = "2"
bar = "${var.bar}"
}
resource "aws_instance" "bar" {
foo = "${var.foo}"
bar = "${lookup(var.amis, var.foo)}"
baz = "${var.amis.us-east-1}"
}