Facing Problem with CloudSQL - Terraform Resource Block

Hello everyone,

I’m serving as the Cloud Engineering Manager at reputable institution and we’ve been using terraform for our Infrastructure as code automation for various projects. Recently we’ve noticed that some of our GCP terraform infrastructure pipelines started failing. Upon troubleshooting we discovered that google_sql_database_instance was not working. When we commented out this resource block the pipelines started to work and created other infra resources.

We first assumed that there might have been a terraform version issue so we upgraded to the latest version (v1.2.3) however we still faced the issue. We went back to terraform registry and copied a default sample code just to ensure that there wasn’t any problem with our tf code and were surprised to discover that the default sample code was not working either.

This is the sample resource block we copied: Terraform Registry

resource “google_sql_database” “database” {

name = “my-database”

instance = google_sql_database_instance.instance.name


# See versions at Terraform Registry

resource “google_sql_database_instance” “instance” {

name = “database-instance-asdasd-uniquestring”

region = “us-central1”

database_version = “MYSQL_8_0”

settings {

tier = “db-f1-micro”


deletion_protection = “true”


On Powershell when we execute the script it gets stucked when we apply the above script with valid credentials (Please note that cloud sql instance name is unique everytime we run the script):

Can someone from the community help us identify the issue. We suspect that this is a global issue since we’ve experienced it on multiple gcp environments. However we can not confirm anything at this moment.

Awaiting prompt response on the matter.