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 support resource import for aws wafregional rate based rule resource #9621

Conversation

teraken0509
Copy link
Contributor

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 #9620

Release note for CHANGELOG:

resource/aws_wafregional_rate_based_rule: Support resource import

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSWafRegionalRateBasedRule_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccAWSWafRegionalRateBasedRule_ -timeout 120m
=== RUN   TestAccAWSWafRegionalRateBasedRule_basic
=== PAUSE TestAccAWSWafRegionalRateBasedRule_basic
=== RUN   TestAccAWSWafRegionalRateBasedRule_changeNameForceNew
=== PAUSE TestAccAWSWafRegionalRateBasedRule_changeNameForceNew
=== RUN   TestAccAWSWafRegionalRateBasedRule_disappears
=== PAUSE TestAccAWSWafRegionalRateBasedRule_disappears
=== RUN   TestAccAWSWafRegionalRateBasedRule_changePredicates
=== PAUSE TestAccAWSWafRegionalRateBasedRule_changePredicates
=== RUN   TestAccAWSWafRegionalRateBasedRule_changeRateLimit
=== PAUSE TestAccAWSWafRegionalRateBasedRule_changeRateLimit
=== RUN   TestAccAWSWafRegionalRateBasedRule_noPredicates
=== PAUSE TestAccAWSWafRegionalRateBasedRule_noPredicates
=== CONT  TestAccAWSWafRegionalRateBasedRule_basic
=== CONT  TestAccAWSWafRegionalRateBasedRule_changeRateLimit
=== CONT  TestAccAWSWafRegionalRateBasedRule_noPredicates
=== CONT  TestAccAWSWafRegionalRateBasedRule_disappears
=== CONT  TestAccAWSWafRegionalRateBasedRule_changePredicates
=== CONT  TestAccAWSWafRegionalRateBasedRule_changeNameForceNew
--- FAIL: TestAccAWSWafRegionalRateBasedRule_disappears (50.17s)
    testing.go:568: Step 0 error: errors during apply:

        Error: Error creating WAF Regional Rate Based Rule (): WAFLimitsExceededException: Operation would result in exceeding resource limits.
        	status code: 400, request id: f4738384-b684-11e9-9455-ef575923e2eb

          on /var/folders/w9/yq_zm9bj24z06tlty8163139j7txby/T/tf-test496410440/main.tf line 11:
          (source code not available)


--- PASS: TestAccAWSWafRegionalRateBasedRule_noPredicates (53.22s)
--- PASS: TestAccAWSWafRegionalRateBasedRule_changeRateLimit (72.60s)
--- PASS: TestAccAWSWafRegionalRateBasedRule_basic (80.40s)
--- PASS: TestAccAWSWafRegionalRateBasedRule_changePredicates (98.57s)
--- PASS: TestAccAWSWafRegionalRateBasedRule_changeNameForceNew (113.13s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	113.218s
make: *** [testacc] Error 1
$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSWafRegionalRateBasedRule_disappears'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccAWSWafRegionalRateBasedRule_disappears -timeout 120m
=== RUN   TestAccAWSWafRegionalRateBasedRule_disappears
=== PAUSE TestAccAWSWafRegionalRateBasedRule_disappears
=== CONT  TestAccAWSWafRegionalRateBasedRule_disappears
--- PASS: TestAccAWSWafRegionalRateBasedRule_disappears (46.93s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	47.019s

@teraken0509 teraken0509 requested a review from a team August 4, 2019 07:02
@ghost ghost added size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/waf Issues and PRs that pertain to the waf service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Aug 4, 2019
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 6, 2019
@bflad bflad added this to the v2.23.0 milestone Aug 6, 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.

Looks good, thanks @kterada0509 🚀

--- PASS: TestAccAWSWafRegionalRateBasedRule_disappears (23.50s)
--- PASS: TestAccAWSWafRegionalRateBasedRule_changePredicates (39.79s)
--- PASS: TestAccAWSWafRegionalRateBasedRule_changeNameForceNew (48.29s)
--- PASS: TestAccAWSWafRegionalRateBasedRule_basic (51.57s)
--- PASS: TestAccAWSWafRegionalRateBasedRule_changeRateLimit (58.54s)
--- PASS: TestAccAWSWafRegionalRateBasedRule_noPredicates (69.87s)

@bflad bflad merged commit 807b660 into hashicorp:master Aug 6, 2019
bflad added a commit that referenced this pull request Aug 6, 2019
@ghost
Copy link

ghost commented Aug 7, 2019

This has been released in version 2.23.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
Copy link

ghost commented Nov 2, 2019

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 Nov 2, 2019
@teraken0509 teraken0509 deleted the feature/add-support-resource-import-for-aws_wafregional_rate_based_rule-resource branch March 5, 2020 14:04
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/M 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.

None yet

2 participants