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 Tag Support for aws_waf_rate_based_rule resource #10479

Merged
merged 9 commits into from
Nov 2, 2019

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Oct 11, 2019

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Relates to #9289

Release note for CHANGELOG:

- resource/resource_aws_waf_rate_based_rule: Add `tags` argument.

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSWafRateBasedRule_'

=== RUN   TestAccAWSWafRateBasedRule_basic
=== PAUSE TestAccAWSWafRateBasedRule_basic
=== CONT  TestAccAWSWafRateBasedRule_basic
--- PASS: TestAccAWSWafRateBasedRule_basic (69.03s)
=== RUN   TestAccAWSWafRateBasedRule_changeNameForceNew
=== PAUSE TestAccAWSWafRateBasedRule_changeNameForceNew
=== CONT  TestAccAWSWafRateBasedRule_changeNameForceNew
--- PASS: TestAccAWSWafRateBasedRule_changeNameForceNew (92.07s)
=== RUN   TestAccAWSWafRateBasedRule_disappears
=== PAUSE TestAccAWSWafRateBasedRule_disappears
=== CONT  TestAccAWSWafRateBasedRule_disappears
--- PASS: TestAccAWSWafRateBasedRule_disappears (56.33s)
=== RUN   TestAccAWSWafRateBasedRule_changePredicates
=== PAUSE TestAccAWSWafRateBasedRule_changePredicates
=== CONT  TestAccAWSWafRateBasedRule_changePredicates
--- PASS: TestAccAWSWafRateBasedRule_changePredicates (90.18s)
=== RUN   TestAccAWSWafRateBasedRule_noPredicates
=== PAUSE TestAccAWSWafRateBasedRule_noPredicates
=== CONT  TestAccAWSWafRateBasedRule_noPredicates
--- PASS: TestAccAWSWafRateBasedRule_noPredicates (39.56s)
=== RUN   TestAccAWSWafRateBasedRule_Tags
=== PAUSE TestAccAWSWafRateBasedRule_Tags
=== CONT  TestAccAWSWafRateBasedRule_Tags
--- PASS: TestAccAWSWafRateBasedRule_Tags (84.49s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	163.531s


...

@DrFaust92 DrFaust92 requested a review from a team October 11, 2019 21:01
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/waf Issues and PRs that pertain to the waf service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Oct 11, 2019
@DrFaust92 DrFaust92 changed the title Add Tag Support for aws_waf_rate_based_rule resource [WIP]Add Tag Support for aws_waf_rate_based_rule resource Oct 11, 2019
@DrFaust92 DrFaust92 changed the title [WIP]Add Tag Support for aws_waf_rate_based_rule resource Add Tag Support for aws_waf_rate_based_rule resource Oct 11, 2019
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Oct 11, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

This will be good to go with one optimization, thanks @DrFaust92 🎉

aws/resource_aws_waf_rate_based_rule.go Outdated Show resolved Hide resolved
aws/resource_aws_waf_rate_based_rule_test.go Show resolved Hide resolved
@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Oct 11, 2019
DrFaust92 and others added 3 commits October 12, 2019 11:03
re-use arn attribute

Co-Authored-By: Brian Flad <bflad417@gmail.com>
rate based rule create function calls read and not update
rate based rule create function calls read and not update
@DrFaust92 DrFaust92 requested a review from bflad October 20, 2019 08:12
use generated function in code
@ghost ghost added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Oct 27, 2019
@bflad bflad added this to the v2.35.0 milestone Nov 2, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @DrFaust92 🚀

--- PASS: TestAccAWSWafRateBasedRule_noPredicates (18.39s)
--- PASS: TestAccAWSWafRateBasedRule_basic (43.32s)
--- PASS: TestAccAWSWafRateBasedRule_disappears (46.17s)
--- PASS: TestAccAWSWafRateBasedRule_changePredicates (69.26s)
--- PASS: TestAccAWSWafRateBasedRule_Tags (75.38s)
--- PASS: TestAccAWSWafRateBasedRule_changeNameForceNew (94.17s)

@@ -286,6 +289,8 @@ func ServiceListTagsInputResourceTypeField(serviceName string) string {
// ServiceListTagsOutputTagsField determines the service tag field.
func ServiceListTagsOutputTagsField(serviceName string) string {
switch serviceName {
case "waf":
return "TagInfoForResource.TagList"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice 👍

return conn.CreateRateBasedRule(params)
})
if err != nil {
return err
}
resp := out.(*waf.CreateRateBasedRuleOutput)
d.SetId(*resp.Rule.RuleId)
return resourceAwsWafRateBasedRuleUpdate(d, meta)
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@bflad bflad merged commit 39a53cf into hashicorp:master Nov 2, 2019
bflad added a commit that referenced this pull request Nov 2, 2019
@DrFaust92 DrFaust92 deleted the tags-rate-based-rule branch November 2, 2019 06:39
@ghost
Copy link

ghost commented Nov 7, 2019

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Nov 7, 2019
@ewbankkit ewbankkit mentioned this pull request Nov 18, 2019
@ghost
Copy link

ghost commented Mar 29, 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!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/waf Issues and PRs that pertain to the waf service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants