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 import support for aws_waf_xss_match_set resource #10485

Merged
merged 4 commits into from
Nov 15, 2019

Conversation

DrFaust92
Copy link
Collaborator

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

Release note for CHANGELOG:

resource/aws_waf_xss_match_set: Support resource import

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSWafXssMatchSet_'


=== RUN   TestAccAWSWafXssMatchSet_basic
=== PAUSE TestAccAWSWafXssMatchSet_basic
=== CONT  TestAccAWSWafXssMatchSet_basic
--- PASS: TestAccAWSWafXssMatchSet_basic (45.46s)
=== RUN   TestAccAWSWafXssMatchSet_changeNameForceNew
=== PAUSE TestAccAWSWafXssMatchSet_changeNameForceNew
=== CONT  TestAccAWSWafXssMatchSet_changeNameForceNew
--- PASS: TestAccAWSWafXssMatchSet_changeNameForceNew (69.28s)
=== RUN   TestAccAWSWafXssMatchSet_disappears
=== PAUSE TestAccAWSWafXssMatchSet_disappears
=== CONT  TestAccAWSWafXssMatchSet_disappears
--- PASS: TestAccAWSWafXssMatchSet_disappears (37.57s)
=== RUN   TestAccAWSWafXssMatchSet_changeTuples
=== PAUSE TestAccAWSWafXssMatchSet_changeTuples
=== CONT  TestAccAWSWafXssMatchSet_changeTuples
--- FAIL: TestAccAWSWafXssMatchSet_changeTuples (59.77s)
    testing.go:569: Step 1 error: After applying this step and refreshing, the plan was not empty:
        
        DIFF:
        
        UPDATE: aws_waf_xss_match_set.xss_match_set
          arn:                                      "arn:aws:waf::476956259333:xssmatchset/b160fc22-72d0-4d26-a8b7-877f28a5a7ac" => "arn:aws:waf::476956259333:xssmatchset/b160fc22-72d0-4d26-a8b7-877f28a5a7ac"
          id:                                       "b160fc22-72d0-4d26-a8b7-877f28a5a7ac" => "b160fc22-72d0-4d26-a8b7-877f28a5a7ac"
          name:                                     "xssMatchSet-omj93" => "xssMatchSet-omj93"
          xss_match_tuples.#:                       "2" => "2"
          xss_match_tuples.0.field_to_match.#:      "1" => "1"
          xss_match_tuples.0.field_to_match.0.data: "" => "GET"
          xss_match_tuples.0.field_to_match.0.type: "BODY" => "METHOD"
          xss_match_tuples.0.text_transformation:   "CMD_LINE" => "HTML_ENTITY_DECODE"
          xss_match_tuples.1.field_to_match.#:      "1" => "1"
          xss_match_tuples.1.field_to_match.0.data: "" => ""
          xss_match_tuples.1.field_to_match.0.type: "METHOD" => "BODY"
          xss_match_tuples.1.text_transformation:   "HTML_ENTITY_DECODE" => "CMD_LINE"
        
        
        
        STATE:
        
        aws_waf_xss_match_set.xss_match_set:
          ID = b160fc22-72d0-4d26-a8b7-877f28a5a7ac
          provider = provider.aws
          arn = arn:aws:waf::476956259333:xssmatchset/b160fc22-72d0-4d26-a8b7-877f28a5a7ac
          name = xssMatchSet-omj93
          xss_match_tuples.# = 2
          xss_match_tuples.0.field_to_match.# = 1
          xss_match_tuples.0.field_to_match.0.data = 
          xss_match_tuples.0.field_to_match.0.type = BODY
          xss_match_tuples.0.text_transformation = CMD_LINE
          xss_match_tuples.1.field_to_match.# = 1
          xss_match_tuples.1.field_to_match.0.data = 
          xss_match_tuples.1.field_to_match.0.type = METHOD
          xss_match_tuples.1.text_transformation = HTML_ENTITY_DECODE
=== RUN   TestAccAWSWafXssMatchSet_noTuples
=== PAUSE TestAccAWSWafXssMatchSet_noTuples
=== CONT  TestAccAWSWafXssMatchSet_noTuples
--- PASS: TestAccAWSWafXssMatchSet_noTuples (33.17s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	108.755s

...

@DrFaust92 DrFaust92 requested a review from a team October 12, 2019 20:48
@ghost ghost added size/L 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 Oct 12, 2019
@DrFaust92
Copy link
Collaborator Author

FYI, TestAccAWSWafXssMatchSet_changeTuples fails regardless of the change

@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 15, 2019
@bflad bflad added this to the v2.37.0 milestone Nov 15, 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 🚀

Output from acceptance testing (test failure unrelated):

--- PASS: TestAccAWSWafXssMatchSet_noTuples (18.48s)
--- FAIL: TestAccAWSWafXssMatchSet_changeTuples (20.84s)
--- PASS: TestAccAWSWafXssMatchSet_basic (27.02s)
--- PASS: TestAccAWSWafXssMatchSet_changeNameForceNew (39.22s)
--- PASS: TestAccAWSWafXssMatchSet_disappears (44.35s)

@bflad bflad merged commit 862ba1c into hashicorp:master Nov 15, 2019
bflad added a commit that referenced this pull request Nov 15, 2019
bflad added a commit that referenced this pull request Nov 15, 2019
@DrFaust92 DrFaust92 deleted the import-waf-xss branch November 15, 2019 17:02
@ghost
Copy link

ghost commented Nov 18, 2019

This has been released in version 2.37.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 Dec 15, 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 Dec 15, 2019
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