-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add convenience field support to Terraform, generate Network #1489
Add convenience field support to Terraform, generate Network #1489
Conversation
This one is a challenge to review without the downstreams - I'll see if I can make sense of them when they come out. |
4a224b9
to
941b3f0
Compare
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesNo diff detected in Inspec. New Pull RequestsI built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed. |
If the network tests pass (and once you fix the quotes that travis is complaining about, and two minor tweaks on the beta / ga modules), I think I trust this to be right. |
# Add a deprecation message for a field that's been deprecated in the API | ||
# use the YAML chomping folding indicator (>-) if this is a multiline | ||
# string, as providers expect a single-line one w/o a newline. | ||
attr_reader :deprecation_message |
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.
fyi @rambleraptor
56ed376
to
0bd5d24
Compare
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesterraform-provider-google-beta already has an open PR. New Pull RequestsI didn't open any new pull requests because of this PR. |
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesterraform-provider-google-beta already has an open PR. New Pull RequestsI didn't open any new pull requests because of this PR. |
Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec.
86ec298
to
b5c48fc
Compare
Sorry for the # of changes! A few things had to happen for this PR.
Contained, roughly in order is;
api.yaml
Going from my definition of convenience fields;
This is adding support for the most useful subset, when a nested objects has been replaced entirely. Most? examples of convenience fields are a single field inside of an object, and this solution will unblock those cases. Support for nested convenience fields is a TODO, and something we should do if it's necessary, not just for fun.
I looked at using the overrides system to do this, and specifying
convenience_name
or something similar on the convenience field itself, but that approach didn't work well in the end. Our model for resource schemas relies pretty heavily on 1:1 mappings API <-> tool, and there are a lot of yaks to shave before that could be changed.[all]
[terraform]
Generate google_compute_network using Magic Modules
[terraform-beta]
[ansible]
[inspec]