github.com/eliastor/durgaform@v0.0.0-20220816172711-d0ab2d17673e/internal/durgaform/testdata/apply-provisioner-destroy/main.tf (about) 1 resource "aws_instance" "foo" { 2 for_each = var.input 3 foo = "bar" 4 5 provisioner "shell" { 6 command = "create ${each.key} ${each.value}" 7 } 8 9 provisioner "shell" { 10 when = "destroy" 11 command = "destroy ${each.key} ${self.foo}" 12 } 13 } 14 15 variable "input" { 16 type = map(string) 17 default = {} 18 }