Last active
March 18, 2022 18:41
-
-
Save w3bward/9a5d3037814586b9906f60bbbfb5c316 to your computer and use it in GitHub Desktop.
This technically works, but is bad in practice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_version = ">= 1.1.6" | |
} | |
locals { | |
my_var = "something" | |
} | |
resource "null_resource" "bad_example" { | |
triggers = { | |
my_var = local.my_var | |
always_run = "${timestamp()}" | |
} | |
provisioner "local-exec" { | |
interpreter = ["Powershell", "-Command"] | |
command = <<EOC | |
write-host "my_var value: ${local.my_var}" | |
EOC | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment