hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.25k stars 1.7k forks source link

google_sql_user with CLOUD_IAM_SERVICE_ACCOUNT type is now totally broken #9942

Open red8888 opened 2 years ago

red8888 commented 2 years ago

Community Note

Terraform Version

Terraform v0.14.11

Affected Resource(s)

google_sql_user

Terraform Configuration Files


resource "google_sql_user" "my-user" {
  name     = my-user@me.com
  instance = "mydb"
  type     = "CLOUD_IAM_SERVICE_ACCOUNT"
}

Debug Output

When applying changes to google_sql_user.my-user, provider
"registry.terraform.io/hashicorp/google" produced an unexpected new value:
Root resource was present, but now absent.

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

Expected Behavior

Resource is created without error

Actual Behavior

Cannot create new google_sql_user with CLOUD_IAM_SERVICE_ACCOUNT type AND all existing google_sql_user CLOUD_IAM_SERVICE_ACCOUNT resources are seen as new resources- like its not reading their state correctly anymore.

Steps to Reproduce

Attempt to create a google_sql_user with CLOUD_IAM_SERVICE_ACCOUNT set

Important Factoids

b/301412603

manterfield commented 2 years ago

I just had the same issue, downgrading to v3.77.0 also works.

dbslone commented 2 years ago

Having the same issue with hashicorp/google ~> 3.86. According to #9723 this was resolved and released in 3.79 but downgrading to 3.77 resolved the issue

bluemalkin commented 2 years ago

Edit: This seems to be working now in 3.89