-
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
Scheduling resource destruction fails with required field not set #16141
Comments
Hi @annismckenzie! I think here you've hit the limitation described in #15762. It looks like you have a You seem to have already discovered the workaround I described in that issue. Agreed that this is awkward and messy. It's not clear yet exactly how we will solve this, since it suggests we need to retain some provider configuration in the state but we currently don't do that to avoid retaining credentials. There is some work going on right now to address some limitations of how providers and modules interact; it's not clear yet whether we'll be able to address this particular issue as part of that, but we're going to try. I'm going to close this just to consolidate the discussion in #15762. Thanks again for reporting this and sharing your workaround! |
Sorry about the duplicate – I'll follow the discussion in the original issue. Thanks for the quick reply! |
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. |
Terraform Version
v0.10.5
Terraform Configuration Files
The code above creates a new AWS record for you. Next you want to delete this record completely.
Expected Behavior
Removing the record from
main.tf
should schedule it for destruction.Actual Behavior
If you remove the module call from your
main.tf
, you get an error like:module.dns_record.provider.aws: "region": required field is not set
.The only way to remove it is:
terraform plan --target=module.dns_record --destroy -out=destroy_plan
terraform apply destroy_plan
And then remove the code from the
main.tf
./cc @radeksimko because we talked about this in the Hub at HashiConf 2017 and he thinks it sounds like a bug.
/cc @arminbuerkle because he reported it to me.
The text was updated successfully, but these errors were encountered: