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
Empty destroy fails on conditional modules #31838
Comments
I am still facing this issue when tested with real resource other than
contents of terraform.tfstate
Before reopening this issue I like to make sure if this needs to be fixed in the terraform vsphere provider or in my script. |
I am also facing this issue, but with AWS and Azure provider. Same Code works with terraform 1.2.9 but not from 1.3.0 till 1.3.2. Seems that happens only when the state is empty ( Remote state or local state). with terraform 1.2.9:Apply / Destroy / Destroy works as expected:
with terraform 1.3.0:
with terraform 1.3.1
with terrform 1.3.2
Please reopen the Issue or should we create a new one. |
It seems, that the state will be handled different since 1.3.0. Without terraform deploy, the state after the commands above looks like:
|
Done: #32006 |
|
Thanks @jkritzen, let's compile this info in a new issue for investigation, since the original example was fixed by the related patch. |
Should i open a new issue? |
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. |
Terraform Version
Terraform Configuration Files
main.tf
:The contents of
.example/main.tf
:Debug Output
https://gist.github.com/jta/4b9bd020354d470c6d1f006b7baf7341
Expected Behavior
Destroying where there is no state should be a no-op.
Actual Behavior
Terraform can apply and destroy the provided config correctly. However, issuing a destroy when the state is empty triggers an error:
Steps to Reproduce
terraform init
terraform destroy
Additional Context
This is a regression introduced by v1.3.0.
References
No response
The text was updated successfully, but these errors were encountered: