-
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
google_sql_user: CLOUD_IAM_SERVICE_ACCOUNT authentication Root resource was present, but now absent #9553
Comments
authentication Root resource was present, but now absent
authentication Root resource was present, but now absent
I can repro the issue using below config resource "google_sql_user" "users" {
name = "[email protected]"
instance = "mysqlinstance-12345"
type = "CLOUD_IAM_SERVICE_ACCOUNT"
} |
Hi @joshuasimon-taulia ! Sorry you're experiencing this issue! Can I see your configuration for Also, can I ask for clarification on a couple of things:
This would be a provider error, typically an eventual consistency error, and I can dig into this once I'm able to reproduce the issue.
This seems to be an error internal to Google, is this an error you are expecting? Thanks! |
I am having the same issue exactly. Here's my slightly redacted code, hopefully it helps.
|
i've updated the issue with the sa creation logic resource "google_service_account" "app" {
account_id = "${var.app_name}-${var.namespace}"
display_name = "Used by ${var.app_name}-${var.namespace} to access cloudsql mysql"
} |
on the first
on a subsequent |
Thank you @revionics-ryan-felder and @joshuasimon-taulia . I'm unable to recreate the same error you're getting, however, I am running into an error with it. The error I get is:
When I changed |
I tried this, but got the following...
|
Also, here is my mysql instance declaration.
|
@megan07 If I had to guess, I'd guess our configs for the google_sql_user resource are different.
|
I've got that
(The only change I've made is the |
For what it's worth, I'm using Terraform version 0.15.1 |
I was able to repro it now. I likely won't have more time today to do it, but will continue working on it tomorrow. Thanks for your quick responses and your help today! |
Thanks! |
I found the bug here - it's a combination of two things really, and I'll have to dig into how to solve it, as I'm not an expert on the nuances of the SQL resources. I'll explain what's happening, and if anyone can point me to any documentation that might help me fix our assumptions, that'd be greatly appreciated! There isn't a way to In this particular case (and I need to clarify what the case is that makes it this way), I'll dig through the docs and see if this is specific to Thanks for your patience on this! |
As per below 3 documentations when creating CloudSql user as IAM authentication type As you mentioned there is no as you could find, below is the sample response and this is the type/contract;
we need https://cloud.google.com/blog/products/databases/iam-database-authentication-comes-to-cloud-sql-for-mysql |
Closed by GoogleCloudPlatform/magic-modules#4984 |
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. |
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
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/joshuasimon-taulia/e62263a8d19ef10ce8239366fb5f3ca6
Panic Output
Expected Behavior
terraform should create the cloudsql mysql IAM users and exit cleanly
Actual Behavior
terraform creates the cloudsql mysql IAM users but throws an error after
apply
Steps to Reproduce
CLOUD_IAM_SERVICE_ACCOUNT
google_sql_user
terraform apply
Root resource was present, but now absent.
errorError: Error, failure waiting for insertion of [email protected] into myapp-staging:
errorImportant Factoids
leveraging the new https://cloud.google.com/blog/products/databases/iam-database-authentication-comes-to-cloud-sql-for-mysql
The text was updated successfully, but these errors were encountered: