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

New Resource: aws_waf_rule_group #3898

Merged
merged 1 commit into from Mar 27, 2018
Merged

New Resource: aws_waf_rule_group #3898

merged 1 commit into from Mar 27, 2018

Conversation

radeksimko
Copy link
Member

Test results

make testacc TEST=./aws TESTARGS='-run=TestAccAWSWafRuleGroup_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSWafRuleGroup_ -timeout 120m
=== RUN   TestAccAWSWafRuleGroup_basic
--- PASS: TestAccAWSWafRuleGroup_basic (36.98s)
=== RUN   TestAccAWSWafRuleGroup_changeNameForceNew
--- PASS: TestAccAWSWafRuleGroup_changeNameForceNew (63.07s)
=== RUN   TestAccAWSWafRuleGroup_disappears
--- PASS: TestAccAWSWafRuleGroup_disappears (34.66s)
=== RUN   TestAccAWSWafRuleGroup_changeActivatedRules
--- PASS: TestAccAWSWafRuleGroup_changeActivatedRules (67.41s)
=== RUN   TestAccAWSWafRuleGroup_noActivatedRules
--- PASS: TestAccAWSWafRuleGroup_noActivatedRules (26.29s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	228.450s

@radeksimko radeksimko added new-resource Introduces a new resource. service/waf Issues and PRs that pertain to the waf service. labels Mar 23, 2018
@ghost ghost added the size/XL Managed by automation to categorize the size of a PR. label Mar 23, 2018
Copy link
Contributor

@appilon appilon left a comment

Choose a reason for hiding this comment

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

Small suggestions of where to move certain functions. Otherwise LGTM

return nil
}

func diffWafRuleGroupActivatedRules(oldRules, newRules []interface{}) []*waf.RuleGroupUpdate {
Copy link
Contributor

Choose a reason for hiding this comment

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

could this differ be transplanted to waf_helpers.go. Does WafRegional have the equivalent resource

return updates
}

func flattenWafActivatedRules(activatedRules []*waf.ActivatedRule) []interface{} {
Copy link
Contributor

Choose a reason for hiding this comment

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

Again could it be moved to helper file?

return out
}

func expandWafActivatedRule(rule map[string]interface{}) *waf.ActivatedRule {
Copy link
Contributor

Choose a reason for hiding this comment

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

could be moved to helper?

Copy link
Contributor

@appilon appilon left a comment

Choose a reason for hiding this comment

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

Might be wrong but I think there is 1 incorrect destroy check

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSWafIPSetDestroy,
Copy link
Contributor

Choose a reason for hiding this comment

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

wrong destroy check?

@ghost ghost added the size/XL Managed by automation to categorize the size of a PR. label Mar 27, 2018
@radeksimko
Copy link
Member Author

@appilon Thanks for the review, I believe I addressed all your feedback, PTAL.

@ghost ghost added the size/XL Managed by automation to categorize the size of a PR. label Mar 27, 2018
Copy link
Contributor

@appilon appilon left a comment

Choose a reason for hiding this comment

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

LGTM!

@ghost ghost added the size/XL Managed by automation to categorize the size of a PR. label Mar 27, 2018
@radeksimko radeksimko merged commit 5396384 into master Mar 27, 2018
@radeksimko radeksimko deleted the f-waf-rule-group branch March 27, 2018 17:14
@bflad bflad added this to the v1.13.0 milestone Mar 29, 2018
@bflad
Copy link
Member

bflad commented Mar 29, 2018

This has been released in version 1.13.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 7, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource Introduces a new resource. service/waf Issues and PRs that pertain to the waf service. size/XL Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants