-
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
Importing CloudSQL replica instance causes errors with settings.maintenance_window #3938
Comments
I'm hitting this too. Only happens with imported replica instances. Probably has something to do with the fact that read replicas don't support configuration of maintenance window. Terraform v0.12.6
|
Anyone looking into this? |
I'm experiencing this too. Might be because Cloud SQL instances allow "any" as a maintenance window spec. |
Still waiting on a fix for this... |
same problem |
trying to edit remote state on GCS to do a workaround fails due to refresh is setting always this:
My intention is to fix by hand the remote state. Someone can share their experiencies trying to edit the remote state? this bug is blocking me so priority should be high. |
ok...
this obviously fails because doesnt have days and it will return
but only if you have differences with your state.
With all this changes done by hand.... terraform thinks the state is up-to-date and I can continue working by now. Please fix this bug :) The suggestion to fix the bug is... |
This is kind of ridiculous as this point. The bug has been open for almost 8 months. Nobody seems to care. |
Ah, I'd been trying to look at this but couldn't figure it out. I've lost all context- unassigning myself so that someone else can pick it up. |
Please someone pick this bug. I just give it up messing with my remote state. The DB replica support is broken that means I can't use terraform on my production systems. I am looking forward to this bug to be fixed. Thanks in advance. |
I was actually able to work around it by removing those replicas completely from remote state, then re-importing them without the |
@mackoftrack can you explain better on what you mean on "reimporting them without the maintenance_window defined"? delete all DB from state. Thanks for your help. |
@YoSmudge @mackoftrack @mercuriete Here is what from cloudsql doc: From GCP console, I don't see Can you provide full debug logs so we can take a closer look? Please take a look, and let me know if this address your issue. Thanks |
We didn't do anything. Edit: Probably is more useful to you if I can provide you the output of the API response when terraform is doing a refresh and a import. Can you tell me the way of debugging API Calls made by terraform? |
@mercuriete what do you see |
Im no longer working on that company. |
I am closing this issue. Feel free to reopen it as someone finds a same issue. Thanks |
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! |
Community Note
Terraform Version
Terraform v0.10.8
Google provider 2.9.1
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
CloudSQL replica imported with
terraform import
with matching configuration should show no changes.Actual Behavior
When setting the
settings.maintenance_window
options to match the configuration in Google Cloud,terraform plan
showsWhen attempting to apply this Google API returns
Setting the parameters to
0
returns a Terraform error withplan
Removing the entire
maintenance_window
and runningterraform apply
with any other change to thegoogle_sql_database_instance
resource returnsAdding
and running
apply
with any other change to thegoogle_sql_database_instance
returnsSteps to Reproduce
google_sql_database_instance
replica viaterraform import
resourcegoogle_sql_database_instance
resourceThe text was updated successfully, but these errors were encountered: