blob: 8804f6495245a96010a0742753940debdff59403 [file] [log] [blame]
resource "aws_instance" "foo" {
for_each = var.input
foo = "bar"
provisioner "shell" {
command = "create ${each.key} ${each.value}"
}
provisioner "shell" {
when = "destroy"
command = "destroy ${each.key} ${self.foo}"
}
}
variable "input" {
type = map(string)
default = {}
}