-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adhoc execute commands for var injection and setup before terraform apply. #5258
Comments
I validated I could execute this before the aws_instance or aws_autoscale_group. resource "null_resource" "pre-flight" {
provisioner "local-exec" {
command = "echo 'pre-flight......'"
}
} However can that be assigned as an input to a variable? i.e. something like: variable "etcd_token" {
"default": "${null_resource.pre-flight.rendered}"
} Last time I tried that I couldn't seem to define a variable with interpolation involved. |
Btw, it looks like, insofar as #4169 ever intended to implement this functionality, it got split off into #8144 (which is currently open). @apparentlymart is doing some excellent work on this front, thanks! |
This can be worked around with an External Data Source: but it's alot of boilerplate |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
At current while trying to generate a fleet cluster id with terraform, I have to wrap the terraform apply process with a script to inject that data as variables.
Using a script similar to:
Is there a better way to do this within terraform?
The text was updated successfully, but these errors were encountered: