-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: update resource names to snake_case #2151
fix: update resource names to snake_case #2151
Conversation
/gcbrun |
@apeabody I checked, but may want to triple-check the I didn't do any functional testing, like bringing this up with the old version of the module, then updating to the new version. |
autogen/main/moved.tf.tmpl
Outdated
# Fix the name typo in the previous ConfigMap creation call | ||
moved { | ||
from = kubernetes_config_map_v1_data.kube-dns-upstream-namservers | ||
to = kubernetes_config_map_v1_data.kube-dns-upstream-nameservers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should be direct to kube_dns_upstream_nameservers
? No sure if they support "chaining"?
Also very likely we won't have a release with the kube-dns-upstream-nameservers
anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair. I'd assumed it would work since the "from" is different, so it would just relocate either that was found?
If you're sure they're going out together, I'll update it now to just have the one. 👍
cc: @MaximF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I don't know is if the move rules are "chained", if they are not and this rule fires, it will just try to move to kube-dns-upstream-nameservers
, which of course no longer exists. As this PR also adds kube_dns_upstream_nameservers
, regardless it should be perfectly safe to go directly to that resource.
Yeah - Prior to merging we should do a quick migration test (create an example with tf apply using the previous version, then tf apply with this version) |
Are you setup to run that easily? I'm not sure if I'll be setup to test it quickly, though I can try if you need me to. question: is there a way to turn on the |
- Update resource names to snake_case - Add `moved` blocks for resources and consolidate into `moved.tf`
38e8773
to
2212fd9
Compare
:) I was also thinking if we can use This default tflint config for modules can be found here: https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/blob/master/infra/build/developer-tools/build/home/.tflint.module.hcl However I also recently added the option for local repo tflint configs, especially given the large number of repos that would likely also need to be updated first: https://github.com/GoogleCloudPlatform/terraform-google-enterprise-application/blob/main/.github/.tflint.repo.hcl As far as testing, I was planning to run a few examples either tomorrow or Friday. |
/gcbrun |
I did a quick test with
|
/gcbrun |
|
BTW, we can update the commit prefix to |
When in doubt I prefer to include in the release notes. If end users do have resources that will be migrated they will see the "moved" in their first subsequent apply, although no changes to the actual resources. |
/gcbrun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @wyardley!
moved
blocks for resources and consolidate intomoved.tf
I considered keeping
-
as a separator between the two parts for thegoogle_project_iam_member
resources, but ended up landing on just keeping everything snake case.Followup to #2149