mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-24 15:36:26 -06:00
21 lines
329 B
HCL
21 lines
329 B
HCL
variable "amis" {
|
|
default = {
|
|
"us-east-1": "foo",
|
|
"us-west-2": "foo",
|
|
}
|
|
}
|
|
|
|
variable "bar" {
|
|
default = "baz"
|
|
}
|
|
|
|
resource "aws_instance" "foo" {
|
|
num = "2"
|
|
bar = "${var.bar}"
|
|
}
|
|
|
|
resource "aws_instance" "bar" {
|
|
foo = "${var.foo}"
|
|
bar = "${lookup(var.amis, var.foo)}"
|
|
}
|