-
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 test and alias for BigQuery Dataset name #1505
Conversation
20c3904
to
2e773d9
Compare
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesNo diff detected in terraform-provider-google-beta. 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. |
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesNo diff detected in terraform-provider-google-beta. New Pull RequestsI didn't open any new pull requests because of this PR. |
lastModifiedTime: !ruby/object:Overrides::Inspec::PropertyOverride | ||
exclude_plural: true | ||
additional_functions: | |
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.
Might be overkill, but what do you think about either:
- Having additional_functions take in a list of Ruby files
- Using the compile() function to add a Ruby file.
That way, you can put this Ruby code in a Ruby file that IDEs, Rubocop + the like can test?
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.
Moved it to using compile
@@ -23,7 +23,8 @@ class PropertyOverride < Overrides::PropertyOverride | |||
def self.attributes | |||
[ | |||
:name_from_self_link, # Set to convert self link to name | |||
:exclude_plural | |||
:exclude_plural, |
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.
Almost certainly overkill, but fyi:
Ansible has two sets of overrides (one for facts modules, one for regular).
In theory, you could do the same with plural/singular resources + just use the regular exclude field.
Again, almost certainly overkill.
@@ -67,7 +67,7 @@ class <%= object.name -%> < GcpResourceBase | |||
|
|||
def parse | |||
<% | |||
parse_code = object.all_user_properties.map do |prop| | |||
parse_code = object.all_user_properties.reject(&:exclude_reader).map do |prop| |
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.
Why wouldn't you just exclude the property altogether?
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.
Good catch! I tried that at one point, but had a bug and forgot to come back to it after I fixed it.
Removed the override and excluded the name
field
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesNo diff detected in terraform-provider-google-beta. 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 statusesNo diff detected in terraform-provider-google-beta. 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 statusesNo diff detected in terraform-provider-google-beta. New Pull RequestsI didn't open any new pull requests because of this PR. |
ebe90d6
to
ccf4821
Compare
Add test and alias for BigQuery Dataset name.
The Dataset response resource does not have a field named
name
, and uses a property on the nesteddataset_reference
object instead. Add custom method to access this property vianame
method call.[all]
[terraform]
[terraform-beta]
[ansible]
[inspec]