-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
google: could not find default credentials when deleting module #23567
Comments
Hi @zagr0, Is it possible to share the source of the module as well? If not, are you certain that you don't have another Thanks! |
sure variable "some_var" {
}
resource "google_compute_network" "network" {
name = var.some_var
auto_create_subnetworks = "false"
} |
Thanks @zagr0, It appears that the module resources are being removed correctly, and are using the correct provider. The error is coming from terraform trying to also configure a default google provider, which does not have any credentials defined. |
@zagr0 Thank you for providing your replication case! I ran through this on the current master branch of Terraform (deploying soon) and was unable to reproduce. I followed both your steps of init/apply/remove module+apply/init/apply again as well as init/apply/remove module/init/apply. In both cases the removed module+resource was removed. |
Sorry, this does look like a regression, but I cannot reproduce it with the config above. It's hard to reproduce in some cases, because the problem is with non-deterministic ordering of operations. I'm going to take care of it with #23821. |
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
Terraform v0.12.17
Terraform Configuration Files
Initial configuration
modules/gcp-resources/main.tf
updated configuration to remove module resources
Expected Behavior
Terraform should destroy resources from module and exit with success
Actual Behavior
Terraform apply failed, exit code 1
STDERR:
Steps to Reproduce
terraform init
terraform apply -var 'gcp_project_name=project_name' -var 'gcp_credentials=gcp-credentials.json'
- SUCCESSterraform init
terraform apply 'gcp_project_name=project_name' -var 'gcp_credentials=gcp-credentials.json'
- FAILUREAdditional Context
there is already opened ticket for the google provider, but they said this is core issue
hashicorp/terraform-provider-google#4272
The text was updated successfully, but these errors were encountered: