-
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
Signed CDN urls for backend services #1604
Signed CDN urls for backend services #1604
Conversation
third_party/terraform/resources/resource_compute_backend_service.go.erb
Outdated
Show resolved
Hide resolved
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesNo diff detected in Ansible. 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. |
dc40b2b
to
96a0094
Compare
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.
Ooops I missed the notification on this, was just trawling PRs and noticed I'd been assigned. Do you mind updating post-#1595?
96a0094
to
cba9b50
Compare
cba9b50
to
818d2cc
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. |
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.
Only minor stuff, otherwise 👍
@@ -10,6 +10,8 @@ import ( | |||
"github.com/hashicorp/terraform/helper/resource" | |||
) | |||
<% | |||
raise 'skip_test should be true if resource is not importable' \ |
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 about skipping the import step when generating tests instead? I'm not a fan of 'knowing' which configurations need to be used together and finding out at build time.
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.
Import is pretty important for the autogenerated tests since we use it to confirm the attributes. In general, I don't really anticipate exclude_import being used much (i.e. pretty much when the resource contains sensitive information that cannot be returned) and the verification of test resources behavior will probably be unique, so it may not make sense?
products/compute/terraform.yaml
Outdated
@@ -234,6 +235,33 @@ overrides: !ruby/object:Overrides::ResourceOverrides | |||
diff_suppress_func: 'compareSelfLinkOrResourceName' | |||
timeoutSec: !ruby/object:Overrides::Terraform::PropertyOverride | |||
default_from_api: true | |||
BackendServiceSignedUrlKey: !ruby/object:Overrides::Terraform::ResourceOverride | |||
exclude_import: true | |||
is_fine_grained_resource: true |
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.
Can this be a property/convenience method based on the existence of nested_query
rather than its own property?
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.
:exclude_import
is less because it's fine-grained, more because this has two fields (name and key) and one is sensitive, so it doesn't really make sense to allow for import. Otherwise, we'd have to supply an empty key value, and the user would be asked to apply the key value, which would just recreate the key.
Also, I want to use nested_query
for collections (i.e. instead of having self_link_query
for list-only resources) which I do think the current validator code doesn't handle correctly but should include still, vs fine-grained which make less sense to include since they can't be tied to a specific CAI resource.
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.
253a40c
to
309895e
Compare
Summary:
I decided to make this a separate resource from backend_bucket_signed_url_key because I didn't like the alternatives I thought of (enum of "backendBuckets" or "backendServices" to sub into URLs), and because reading them from the backend object might diverge eventually since backend_buckets structure is much more simple than services.
[all]
[terraform]
Signed CDN urls for backend services
[terraform-beta]
Signed CDN urls for backend services
[ansible]
[inspec]