terraform-provider-google: Terraform fails to delete default root cloudsql user

Terraform Version

terraform 0.11.3 provider 1.6.0

Affected Resource(s)

Please list the resources as a list, for example:

  • google_sql_database_instance

Terraform Configuration Files

https://gist.github.com/madamkiwi/e0aa06d6b4479cdaf8b1cbbcb4eeeb83#file-cloud-sql-tf

Debug Output

google cloud api logs: https://gist.github.com/madamkiwi/e0aa06d6b4479cdaf8b1cbbcb4eeeb83#file-google-cloud-api-log

terraform cli logs for run 1: https://gist.github.com/madamkiwi/e0aa06d6b4479cdaf8b1cbbcb4eeeb83#file-terraform-cli-error-1-log

terraform cli logs for run 2: https://gist.github.com/madamkiwi/e0aa06d6b4479cdaf8b1cbbcb4eeeb83#file-terraform-cli-error-2-log

Unfortunately we did not run this with debug log level turned on.

Panic Output

Expected Behavior

The DB instance stands up correctly without errors.

Actual Behavior

Two terraform applys were triggered at the same time to create brand new resources and as a result it failed to bring up the db instance on both. The errors are in the links above.

There may be a race condition between the two but we dont really think that possible given both invocations were creating totally different cloudsql instances.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. run two terraform applies with templates that have a cloud sql db
  2. both will fail with an error

Important Factoids

none

References

none

cc @kkallday

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (11 by maintainers)

Commits related to this issue

Most upvoted comments

I’m sorry to hear you’re having these issues! I’ve asked the Cloud SQL team to look into it, but I am going to leave this issue closed as it’s not an issue with Terraform.

All righty, I’ll take a look. Thanks!