-
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
google_bigtable_gc_policy max_age.days is deprecated but "doesn't support update" #8416
google_bigtable_gc_policy max_age.days is deprecated but "doesn't support update" #8416
Comments
given that this is fairly small and there is a workaround (destroying and recreating manually) I think its safe to label this as an enhancement. @rileykarson do you agree? |
Changing a deprecated field to the new representation should generally work without a diff imo- I'd prefer we treat it as a bug. We should be able to handle this transition using a customizediff, I think? |
Thanks for deduping this @rileykarson - sorry for not finding this one first. |
As a possible workaround, do we know if just destroying state for the old gc policies and letting tf create / recreate them is safe, or if it will result in duplicate policies? I already discovered that removing the state and importing won't work since the resource isn't importable. |
Ahh okay cool, so it looks like this is definitely a bug on our part! This resource actually doesn't support updating at all but creating/destruction is roughly equivalent. We didn't have forceNew on the field so ya! Fix coming in soon :) |
One thing I'm seeing is: We are seeing this when I removed the state for a policy and tried to recreate it |
Got it! That's a... surprisingly specific rule from the API. Looks like we'll want to at least investigate handling this with more finesse. We'd decided it was OK to just set @ScottSuarez can you look into this again when you have the chance? We'd want users to be able to transition from the old -> new representation with no diff. |
The specific error I got was:
For most, removing the state and re-creating seemed to work. However, for one resource, the existing state seemed to have been consistent, but applying a change after updating to the new language gave the error above. Since import isn't supported, it's not possible really to do anything else. 😞 We suspect that disabling replication, updating the gc policy, and then re-enabling replication might work, but haven't tested yet. Also, https://cloud.google.com/bigtable/docs/replication-overview has some more details and is the source for what I posted above. |
I'm not too familiar with replicated tables. I'll play around with it to see if updating this gc_policy is something feasible. |
@ScottSuarez @rileykarson if the values got normalized under the hood to a common unit, would that help? i.e., if the provider can tell that the value is equivalent, it wouldn't need to update it at all. |
The provider ends up being a little pickier than that (it can't recognise that two fields are related), but that's what should be possible per #8416 (comment) |
I've got a fix in the works @wyardley utilizing your suggestion! :) |
Awesome - 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
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
The latest version of terraform-provider-google shows warning about max_age.days being deprecated so i should be able to update it to duration.
Actual Behavior
i already have a gc policy created with above terraform config. After i updated the provider, i got a deprecated notice:
so i tried to change
days=365
toduration = "4344h"
.terraform plan
doesn't complain but when i try to run apply, i got:The text was updated successfully, but these errors were encountered: