-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
resource_spanner_instance passes incorrect billingProject during force_destroy #21007
resource_spanner_instance passes incorrect billingProject during force_destroy #21007
Comments
I'll open a PR for this fix. |
Hi @Noremac201 I've tried to replicate this issue with the following code which is similar to the terraform registry example (link here), but everything worked fine without errors during creation, deletion and forcing deletion.
Could you please share with us the code you are using WITHOUT USING MODULES, VARIABLES or LOCALS to ensure this is an issue as well as being clearer with the steps? You commented this happens with
For sensitive data you could use examples like:
|
Hey @ggtisc , thanks for looking into this. This is only reproducible if an instance has a database that has a backup is attempted to be deleted. Sorry I wasn't clear since I was going to send a PR myself. So the steps are:
Edit* Removed error message as it was incorrect, I will paste the correct one once the backup finishes. |
Hmm, ok that is very odd, I'll continue to try to replicate this, I haven't been able to as you said. The real place that I found this was in KCC's K8s Config Connector with this error:
Which in this case it's very obvious that billing project and userAgent are swapped somewhere, and the fact that the code says they're swapped here seems to confirm it as well. I'm not sure how it's not reproducible here though.. |
Maybe some update occurred during this short time. In any case, if it is caused by 3rd party software, whether directly or orchestrated, we would not be able to intervene, but if it is directly related to terraform and google providers and it happens again, please let us know. |
Sorry to necro-post, this has been submitted. Debug logs show this:
So in TF's case for some reason useragent is set as the same as project number, which is how this bug was uncaught in TF for so long. However, when user-agent is used properly, the issue happens. |
Community Note
https://github.com/hashicorp/terraform-provider-google/blob/main/google/services/spanner/resource_spanner_instance.go#L776
https://github.com/hashicorp/terraform-provider-google/blob/main/google/services/spanner/resource_spanner_instance.go#L38
Method signatures are backwards.
Terraform Version & Provider Version(s)
All google-provider-versions
Affected Resource(s)
resource_spanner_instance
Terraform Configuration
No response
Debug Output
No response
Expected Behavior
No response
Actual Behavior
No response
Steps to reproduce
terraform apply
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: