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 import for aws_waf_byte_match_set resource #10477

Merged
merged 5 commits into from
Oct 11, 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_byte_match_set: Support resource import

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSWafByteMatchSet_'

=== RUN   TestAccAWSWafByteMatchSet_basic
=== PAUSE TestAccAWSWafByteMatchSet_basic
=== CONT  TestAccAWSWafByteMatchSet_basic
--- PASS: TestAccAWSWafByteMatchSet_basic (52.29s)
=== RUN   TestAccAWSWafByteMatchSet_changeNameForceNew
=== PAUSE TestAccAWSWafByteMatchSet_changeNameForceNew
=== CONT  TestAccAWSWafByteMatchSet_changeNameForceNew
--- PASS: TestAccAWSWafByteMatchSet_changeNameForceNew (89.50s)
=== RUN   TestAccAWSWafByteMatchSet_changeTuples
=== PAUSE TestAccAWSWafByteMatchSet_changeTuples
=== CONT  TestAccAWSWafByteMatchSet_changeTuples
--- FAIL: TestAccAWSWafByteMatchSet_changeTuples (81.89s)
    testing.go:569: Step 1 error: After applying this step and refreshing, the plan was not empty:
        
        DIFF:
        
        UPDATE: aws_waf_byte_match_set.byte_set
          byte_match_tuples.#:                       "2" => "2"
          byte_match_tuples.0.field_to_match.#:      "1" => "1"
          byte_match_tuples.0.field_to_match.0.data: "" => "GET"
          byte_match_tuples.0.field_to_match.0.type: "METHOD" => "METHOD"
          byte_match_tuples.0.positional_constraint: "CONTAINS_WORD" => "CONTAINS_WORD"
          byte_match_tuples.0.target_string:         "blah" => "blah"
          byte_match_tuples.0.text_transformation:   "URL_DECODE" => "URL_DECODE"
          byte_match_tuples.1.field_to_match.#:      "1" => "1"
          byte_match_tuples.1.field_to_match.0.data: "referer" => "referer"
          byte_match_tuples.1.field_to_match.0.type: "HEADER" => "HEADER"
          byte_match_tuples.1.positional_constraint: "CONTAINS" => "CONTAINS"
          byte_match_tuples.1.target_string:         "badrefer1" => "badrefer1"
          byte_match_tuples.1.text_transformation:   "NONE" => "NONE"
          id:                                        "7fe3c5d6-bbc4-474d-84dc-0e60b3000421" => "7fe3c5d6-bbc4-474d-84dc-0e60b3000421"
          name:                                      "byteMatchSet-y30mt" => "byteMatchSet-y30mt"
        
        
        
        STATE:
        
        aws_waf_byte_match_set.byte_set:
          ID = 7fe3c5d6-bbc4-474d-84dc-0e60b3000421
          provider = provider.aws
          byte_match_tuples.# = 2
          byte_match_tuples.0.field_to_match.# = 1
          byte_match_tuples.0.field_to_match.0.data = 
          byte_match_tuples.0.field_to_match.0.type = METHOD
          byte_match_tuples.0.positional_constraint = CONTAINS_WORD
          byte_match_tuples.0.target_string = blah
          byte_match_tuples.0.text_transformation = URL_DECODE
          byte_match_tuples.1.field_to_match.# = 1
          byte_match_tuples.1.field_to_match.0.data = referer
          byte_match_tuples.1.field_to_match.0.type = HEADER
          byte_match_tuples.1.positional_constraint = CONTAINS
          byte_match_tuples.1.target_string = badrefer1
          byte_match_tuples.1.text_transformation = NONE
          name = byteMatchSet-y30mt
=== RUN   TestAccAWSWafByteMatchSet_noTuples
=== PAUSE TestAccAWSWafByteMatchSet_noTuples
=== CONT  TestAccAWSWafByteMatchSet_noTuples
--- PASS: TestAccAWSWafByteMatchSet_noTuples (41.12s)
=== RUN   TestAccAWSWafByteMatchSet_disappears
=== PAUSE TestAccAWSWafByteMatchSet_disappears
=== CONT  TestAccAWSWafByteMatchSet_disappears
--- PASS: TestAccAWSWafByteMatchSet_disappears (48.04s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	138.181s

...

@DrFaust92 DrFaust92 requested a review from a team October 11, 2019 19:42
@ghost ghost added size/L Managed by automation to categorize the size of a PR. service/waf Issues and PRs that pertain to the waf service. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 11, 2019
@DrFaust92
Copy link
Collaborator Author

FYI, TestAccAWSWafByteMatchSet_changeTuples seems ro fails regardless of the change

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

LGTM, thanks @DrFaust92 🚀

(Same, unrelated failure)

--- PASS: TestAccAWSWafByteMatchSet_noTuples (21.34s)
--- FAIL: TestAccAWSWafByteMatchSet_changeTuples (33.66s)
--- PASS: TestAccAWSWafByteMatchSet_basic (36.76s)
--- PASS: TestAccAWSWafByteMatchSet_changeNameForceNew (39.74s)
--- PASS: TestAccAWSWafByteMatchSet_disappears (48.34s)

@bflad bflad merged commit b6e1c44 into hashicorp:master Oct 11, 2019
bflad added a commit that referenced this pull request Oct 11, 2019
@DrFaust92 DrFaust92 deleted the import-waf-byte-match branch November 2, 2019 06:40
@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