Unable to create google_sql_database_instance without error

185 views
Skip to first unread message

mumblez

unread,
Mar 21, 2017, 8:19:30 PM3/21/17
to Terraform
Not sure if it's an issue with Google's backend but if I try to create an instance I get:
---
Error applying plan:

1 error(s) occurred:

* google_sql_database_instance.mydb: 1 error(s) occurred:

* google_sql_database_instance.mydb: Error, attempting to list users associated with instance mydb: googleapi: Error 500: Backend Error, backendError
---

resource "google_sql_database_instance" "mydb" {
  name             = "mydb"
  region           = "${var.region}"
  project          = "${var.project}"
  database_version = "MYSQL_5_7"

  settings {
     tier = "db-f1-micro"
  }
}

The database is successfully created but terraform returns the above error!
Using terraform 0.9.1 but also tested with same affect on 0.8.8



Paddy Foran

unread,
Apr 3, 2017, 3:36:45 PM4/3/17
to terrafo...@googlegroups.com
Hi! Sorry for the problems here. :( This does appear to be an upstream error in the Cloud SQL API, but we're tracking it and potential for workaround here: https://github.com/hashicorp/terraform/issues/13091

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/8f6f9d88-63c0-448f-80fd-64c4782e6f9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paddy Foran

unread,
Apr 3, 2017, 3:37:59 PM4/3/17
to terrafo...@googlegroups.com
Oops! Sorry, I lied to you. Different issue, but one we're aware of that is _also_ upstream in the cloud SQL API, which we're looking for potential workarounds on. We don't have a Github issue for it yet, but if you'd like to open one, we'll keep it updated as we learn more. :)

mumblez

unread,
Apr 3, 2017, 3:45:26 PM4/3/17
to Terraform
Thanks Paddy, I think it's related, it randomly succeeds but more times than not it errors, if it helps, it succeeds a little more often if I use a larger instance, maybe cos it finishes setting up quicker avoiding any timeout issue.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.

Paddy Foran

unread,
Apr 3, 2017, 4:57:08 PM4/3/17
to terrafo...@googlegroups.com
Thanks for the info! I'll add it to my notes. We're communicating with people inside Google on this, and it's breaking tests for us, so we're definitely trying to find a solution. Sorry for the issues in the meantime. :)

To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/628f5b7b-33e8-46b6-a034-f68cc3685af8%40googlegroups.com.

antoni...@drafteam.com.br

unread,
Aug 20, 2017, 7:23:48 PM8/20/17
to Terraform
No news? We are stucked with Terraform because we can't get our sql instances up.

Paddy Carver

unread,
Aug 22, 2017, 6:19:22 PM8/22/17
to terrafo...@googlegroups.com
Our test runs for this have been pretty stable in the last month or two. Are you still seeing an error with a 500 status code? If may be worth opening an issue at https://issuetracker.google.com. Unfortunately, there's not a whole lot Terraform can do in the face of server errors. :(

To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/1454fec7-2430-4fcc-8c52-f7ae7215f6eb%40googlegroups.com.

mumblez

unread,
Aug 24, 2017, 12:00:23 PM8/24/17
to Terraform
Hi Paddy,

It's hard to tell as we're not always launching new db instances, but I still recall race conditions for simple setup of db instance, db, user and having to run it multiple times to fix. Given the chance I will test and report again.

YT
Reply all
Reply to author
Forward
0 new messages