Skip to content
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

Include 'Exceed Redirect Options' in security policy rules #5946

Merged
merged 1 commit into from
Apr 19, 2022
Merged

Include 'Exceed Redirect Options' in security policy rules #5946

merged 1 commit into from
Apr 19, 2022

Conversation

ddagunts
Copy link
Contributor

@ddagunts ddagunts commented Apr 15, 2022

fixes hashicorp/terraform-provider-google#11471
Pass the "exceed redirect options" to security policy rules. Applies to action taken when "throttle" rule is implemented with action of type "redirect".

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

compute: added passing `exceed_redirect_options` field for `google_compute_security_policy` rules

@google-cla
Copy link

google-cla bot commented Apr 15, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@melinath, please review this PR or find an appropriate assignee.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform Beta: Diff ( 2 files changed, 85 insertions(+), 14 deletions(-))

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform Beta: Diff ( 2 files changed, 85 insertions(+), 14 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1987
Passed tests 1745
Skipped tests: 240
Failed tests: 2

Action taken

Triggering VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComputeSecurityPolicy_withRateLimitWithRedirectOptions|TestAccServiceNetworkingPeeredDNSDomain_basic

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeSecurityPolicy_withRateLimitWithRedirectOptions[view]
TestAccServiceNetworkingPeeredDNSDomain_basic[view]

All tests passed
View the build log or the debug log for each test

@ddagunts ddagunts changed the title WIP: include 'Exceed Redirect Options' in security policy rules Include 'Exceed Redirect Options' in security policy rules Apr 18, 2022
@ddagunts
Copy link
Contributor Author

Hello,

I apologize, I'm not able to build and test the modules. "make build" fails after fmt on the generated "ga" and "beta" provider codebases; some imports appear missing (time, encoding/json) from seemingly unrelated files (google/gke_hub_operation.go). I was trying to use the "Cloud Shell" in a personal account to build and test - I can not run tests in my work environment.

Thank you,
Dmitry

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a reasonable implementation - the underlying redirect options object is the same in both cases. There's a new test that exercises the field, and it's passing. The code is also properly gated since this is only available in beta.

@melinath melinath merged commit 93d4213 into GoogleCloudPlatform:main Apr 19, 2022
@ddagunts ddagunts deleted the security-policy-exceed-redirect-options branch April 20, 2022 01:24
saqibkhanspeaks12 pushed a commit to saqibkhanspeaks12/magic-modules that referenced this pull request Apr 25, 2022
betsy-lichtenberg pushed a commit to betsy-lichtenberg/magic-modules that referenced this pull request Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement exceed_redirect_options for exceed_action of redirect in security policy
3 participants