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 waf regional xss match set #11432

Merged
merged 2 commits into from
Jan 4, 2020

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" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Release note for CHANGELOG:

resource/aws_wafregional_xss_match_set: Support resource import

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSWafRegionalXssMatchSet_'
--- PASS: TestAccAWSWafRegionalXssMatchSet_basic (66.24s)
--- PASS: TestAccAWSWafRegionalXssMatchSet_changeNameForceNew (85.67s)
--- PASS: TestAccAWSWafRegionalXssMatchSet_disappears (53.81s)
--- FAIL: TestAccAWSWafRegionalXssMatchSet_changeTuples (93.39s)
    testing.go:640: Step 2 error: After applying this step and refreshing, the plan was not empty:
        
        DIFF:
        
        UPDATE: aws_wafregional_xss_match_set.test
          id:                                      "455cfd97-a392-4996-bd96-629ab2e3c9c6" => "455cfd97-a392-4996-bd96-629ab2e3c9c6"
          name:                                    "xssMatchSet-8nn3z" => "xssMatchSet-8nn3z"
          xss_match_tuple.#:                       "2" => "2"
          xss_match_tuple.0.field_to_match.#:      "1" => "1"
          xss_match_tuple.0.field_to_match.0.data: "" => "GET"
          xss_match_tuple.0.field_to_match.0.type: "BODY" => "METHOD"
          xss_match_tuple.0.text_transformation:   "CMD_LINE" => "HTML_ENTITY_DECODE"
          xss_match_tuple.1.field_to_match.#:      "1" => "1"
          xss_match_tuple.1.field_to_match.0.data: "" => ""
          xss_match_tuple.1.field_to_match.0.type: "METHOD" => "BODY"
          xss_match_tuple.1.text_transformation:   "HTML_ENTITY_DECODE" => "CMD_LINE"
        
        
        
        STATE:
        
        aws_wafregional_xss_match_set.test:
          ID = 455cfd97-a392-4996-bd96-629ab2e3c9c6
          provider = provider.aws
          name = xssMatchSet-8nn3z
          xss_match_tuple.# = 2
          xss_match_tuple.0.field_to_match.# = 1
          xss_match_tuple.0.field_to_match.0.data = 
          xss_match_tuple.0.field_to_match.0.type = BODY
          xss_match_tuple.0.text_transformation = CMD_LINE
          xss_match_tuple.1.field_to_match.# = 1
          xss_match_tuple.1.field_to_match.0.data = 
          xss_match_tuple.1.field_to_match.0.type = METHOD
          xss_match_tuple.1.text_transformation = HTML_ENTITY_DECODE
--- PASS: TestAccAWSWafRegionalXssMatchSet_noTuples (52.66s)
...

@DrFaust92 DrFaust92 requested a review from a team December 29, 2019 13:26
@ghost ghost added size/L Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/waf Issues and PRs that pertain to the waf service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 29, 2019
@ghost ghost added the documentation Introduces or discusses updates to documentation. label Dec 31, 2019
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 4, 2020
@bflad bflad added this to the v2.44.0 milestone Jan 4, 2020
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 with one documentation fix which will be handled on merge. Thanks, @DrFaust92 🚀

Output from acceptance testing (failure on master and unrelated):

--- PASS: TestAccAWSWafRegionalXssMatchSet_basic (11.34s)
--- PASS: TestAccAWSWafRegionalXssMatchSet_noTuples (11.95s)
--- PASS: TestAccAWSWafRegionalXssMatchSet_disappears (12.59s)
--- PASS: TestAccAWSWafRegionalXssMatchSet_changeNameForceNew (35.32s)
--- FAIL: TestAccAWSWafRegionalXssMatchSet_changeTuples (42.45s)

AWS WAF Regional XSS Match can be imported using the `id`, e.g.

```sh
$ terraform import xss_match_set.set 12345abcde
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$ terraform import xss_match_set.set 12345abcde
$ terraform import aws_wafregional_xss_match_set.example 12345abcde

@bflad bflad merged commit d771629 into hashicorp:master Jan 4, 2020
bflad added a commit that referenced this pull request Jan 4, 2020
@ghost
Copy link

ghost commented Jan 10, 2020

This has been released in version 2.44.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 Mar 27, 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 27, 2020
@DrFaust92 DrFaust92 deleted the waf-regional-xss-import branch April 24, 2020 07:08
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