-
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
SQL Database Instance fails with Not Found #167
Comments
Hey @bradgignac, I'm not able to reproduce this. Is it still happening for you? If so, can you also share the snippet of the initial POST request/response from the logs? |
@danawillow I think this is the entire relevant snippet, including the initial POST:
The full logs are available here at https://gist.github.com/bradgignac/b8e27c1339c19f846fe1842ea88f11c6. |
@danawillow One other thing worth noting that might be another effect of whatever my problem is: every Cloud SQL resource complains if the project attribute isn't explicitly set. The docs indicate these are optional. Any possibility there's something about my provider setup that is causing issues specific to Cloud SQL resources? |
You always need a project set, but it doesn't have to be in the resource itself. Looks like you have it set in your provider config, so that should be enough:
If you remove it from the cloud sql resource, does it fail? Are you able to set up other resources successfully? |
FWIW, I've also encountered this issue. Haven't had a chance yet to look into more details. |
Same thing happening with the latest Terraform v0.10.5 Config: Module
Use of module
Error when running as follows:
|
This also happens when creating new databases & users:
But funnily enough those two resources do make it into the terraform state regardless of the errors above ^ and a subsequent plan shows no changes needed |
This one is still happening :( Not sure if its in the track for a fix for the next provider release? Cheers, Joe |
No, not for the next release. I can try again to see if I can reproduce it but my efforts are better spent right now on issues that I can. If someone else wants to try debugging this please go for it. |
Let me know if you want any debug logs for this, trying with simple resource/module detailed in my comment above fails every time |
I believe that this is suffering from the same problem detailed in #436 whereby the project is missing as its in the config block rather than provider Debug log shows the following:
|
Oh, it is. That was what I thought before but then I couldn't find where it was setting the project from the wrong place for some reason. Just found it now. |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
I'm having some trouble getting the
google_sql_database_instance
resource to work. I believe I've traced it back to a poorly formed GET request to the operations endpoint, so I'm filing an issue here. I've included the full error report and debug logs below, but I believe this is the relevant snippet from the debug logs:Notice that the request is being made to
http://www.googleapis.com/sql/v1beta4/projects//operations/16b6609c-b951-4432-a1d7-16de14328f60?alt=json
, which does not include theproject
segment of the URL, which is documented at https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/operations/get.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/bradgignac/b8e27c1339c19f846fe1842ea88f11c6
Expected Behavior
Terraform should wait for the database instance to complete provisioning, correctly update the statefile and report success.
Actual Behavior
Terraform is failing to read from the Operations API endpoint and immediately reports an error. The database instance spins up successfully, but the state file is never updated so Terraform doesn't know it exists.
Steps to Reproduce
terraform apply
Important Factoids
Credentials are being read from the
GOOGLE_APPLICATION_CREDENTIALS
environment variable.References
@danawillow sent me hashicorp/terraform#13091 in GCP Community Slack. This appears to be a similar but not quite the same issue that was fixed in a previous release, so I'm not convinced I'm seeing the same thing. Also worth calling out that this fails every time.
The text was updated successfully, but these errors were encountered: