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

Add rate limit options to google_compute_security_policy #3596

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

anovis
Copy link

@anovis anovis commented Sep 7, 2021

closes hashicorp/terraform-provider-google#10020

similar to hashicorp/terraform-provider-google#8984

todo:

do i need to add a pr to the main google repo to add the compute structs for RateLimitOptions ?

Copy link
Contributor

@megan07 megan07 left a comment

Choose a reason for hiding this comment

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

Hi @anovis ! Thank you for your contribution and sorry for the delay in review! The majority of our PRs are open in our upstream repo where they are automatically assigned reviewers, this was mistakenly overlooked. I left one comment, feel free to make those changes in the upstream file and it will make it easier for us to run tests and review!

@@ -311,6 +397,9 @@ func resourceComputeSecurityPolicyRead(d *schema.ResourceData, meta interface{})
if err := d.Set("adaptive_protection_config", flattenSecurityPolicyAdaptiveProtectionConfig(securityPolicy.AdaptiveProtectionConfig)); err != nil {
return fmt.Errorf("Error setting adaptive_protection_config: %s", err)
}
if err := d.Set("rate_limit_options", flattenSecurityPolicyRateLimitOptions(securityPolicy.RateLimitOptions)); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we're going to want to move all of this logic inside the flattenSecurityPolicyRules logic, since it is nested inside the rule. That being said, I think the type we're looking for here is called SecurityPolicyRuleRateLimitOptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants