-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
0.11.4 Outputs forcing failures during apply (destroy) #17655
Comments
Actually just reviewed changelog and found a way around the issues described above:
|
Hi @hawksight, Thanks for filing the issue, and for all the detailed information. This looks very similar to the issue described in #17548, and might have found one of the cases where that PR can't cover. Can you try re-running your example, but instead of saving the plan, run Thanks! |
I've just given that a try and the count issue doesn't appear but the output reliant on the data provider still errors:
For reference, in my module for k8s cluster, I have the following data step, which allows me to get all the instance_urls (al though recent google-provider plugin should allow me to change this) data "google_container_cluster" "information" {
name = "${google_container_cluster.cluster.name}"
zone = "${google_container_cluster.cluster.zone}"
depends_on = ["google_container_node_pool.pools"]
} The output error is grabbing the relevant information from that step. I guess this is something I wouldn't expect to pop up in a destroy given I no longer care about the output. |
Oh wait, I just realised... terraform actually did remove everything as the output suggests, just it popped that error at the bottom, so I assumed it hadn't. Using the
|
Thanks for the follow up. It looks like there are actually 2 issues here, the other being #17425, though I thought that was taken care of when a full destroy was being run. |
I can confirm that I'm hitting this issue too with terraform 0.11.4 |
Can confirm I'm seeing this on 0.11.5 on MacOS and that the workaround with |
For me, on 0.11.6 same happens here,
I got this:
I guess that terraform just try parse data to int, without evaluate the expression |
This variable is a workaround for hashicorp/terraform#17655.
This variable is a workaround for hashicorp/terraform#17655.
This variable is a workaround for hashicorp/terraform#17655.
This variable is a workaround for hashicorp/terraform#17655.
This variable is a workaround for hashicorp/terraform#17655.
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. |
Hello, since using 0.11.4 I have noticed issues with destroying infrastructure.
Essentially where I have outputs configured, my
apply
commands seem to bomb out at point where it can no longer fulfill the output data.The issues are mainly in these three examples:
In the module
cluster
I have a data object to retrieve all the instance URLS once the k8s cluster and node pool(s) have been created. In the errors below you can see that the cluster and node pool have just been destroyed before this error raisesIn module
network
I use a count fed from a var to create subnets in gcloud.The common theme is that the errors are based around outputs. These outputs still work fine when creating the infrastructure, but seem to be erroring when tearing down the infrastructure.
eg:
Terraform Version
Terraform Configuration Files
I have tried to include the main stuff and the relevant parts of the 'module' code we use. Eg. the outputs mainly. These are here
Sorry its not a full code example which is hard to share in gist.
Debug Output
Enabled the env var and retried from initial failure point. Eg. this is just after the failure shown in Actual behaviour below.
Crash Output
No crash and now once I hit error point, I set
TF_LOG=DEBUG
but nothing is logging as nothing runs yet.Expected Behavior
I expected the apply to destroy the resources as per the plan, as it has done in all prior versions (back to 0.10.something).
I would not expect the destroy behaviour to be concerned with outputs.
Actual Behavior
The plan worked as normal, however mid way through the destroy the command errored with the following errors:
Initially asked around on google cloud terraform slack channel regarding the following two:
After recreating im more concerned that the issue is that terraform is even looking at outputs when doing a destroy plan.
Steps to Reproduce
google_compute_subnetwork
via a count.terraform plan -var-file=inputs.tfvars -out plan -destroy
terraform apply plan
Optionally.
Additional Context
First noticed this late on friday (16/03/2018) when trying to pull down a dev environment. Think brew had updated that morning to the latest terraform.
This only happens on destroy, creation seems to work fine. I think with timing it is 0.11.4 related and the fact everything works as expected on 0.11.3.
References
After some discussions with Paddy on Slack, he referred me to some issues / PRs that may have touched or affected the relevant area of code.
Not necessarily to link but could aid in investigation.
Potentially related: #16782
The text was updated successfully, but these errors were encountered: