Closed samhumphreys-2sixty closed 3 years ago
I have also just encountered this same issue, with both google_container_cluster
and google_container_node_pool
. Both resources declared with provider = google-beta
, and using the same Terraform version and provider versions as stated in the issue above.
It seems this is not limited to just a single resource. It is also not the case for all google-beta resources, as mentioned above, removing google_compute_address
worked as expected.
I can repro this issue. It appears me an Terraform issue. What do you think @c2thorn?
Hi @samhumphreys-2sixty, you are experiencing behavior specific to Terraform in general, and not the Google provider. Terraform notices a reference to the google-beta
provider in state, but your configuration doesn't have a reference to it (It would be nice if the required_providers block was enough).
I believe you are seeing inconsistent behavior for removing resources based on whether or not it was the last reference to google-beta
in your config. If you add a provider block to your config like:
provider "google-beta" {
}
and try removing any google-beta
resources, you should not see this error any more. I will close this for now, but please try this out and let us know.
@c2thorn thanks, you're right. The provider configuration is still necessary to destroy the resources, though as you say it would be nice if the required_providers block was authoritative. Not an issue though, thanks!
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v0.13.2
Affected Resource(s)
google_compute_global_address
Terraform Configuration Files
Debug Output
https://gist.github.com/samhumphreys-2sixty/9ebe6895172bc72b740f7a052d8e4e92
Expected Behavior
google_compute_global_address should have been destroyed.
Actual Behavior
Error raised that provider configuration not present, despite still being in the Terraform file. Also this wasn't an upgrade to Terraform 13, which is where this issue usually arises (mapping legacy providers).
Error -
Error: Provider configuration not present
Steps to Reproduce
terraform apply
- using the full initial configterraform apply
Important Factoids
Authenticating as a user.
Seems to be limited to google-beta provider only for resource google_compute_global_address.
Unable to replicate this for a resource google_compute_address using the google-beta provider
0000