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

New data source: aws_wafv2_regex_pattern_set #12789

Merged

Conversation

pvanbuijtene
Copy link
Contributor

@pvanbuijtene pvanbuijtene commented Apr 12, 2020

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

Closes #11179
Relates #11046
Depends on #12284 because of duplicated code for tests.

Release note for CHANGELOG:

**New Data Source:** `aws_wafv2_regex_pattern_set` (#12789)

Output from acceptance testing:

make testacc TEST=./aws TESTARGS='-run=TestAccDataSourceAwsWafv2Regex'
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAwsWafv2Regex -timeout 120m
=== RUN   TestAccDataSourceAwsWafv2RegexPatternSet_Basic
=== PAUSE TestAccDataSourceAwsWafv2RegexPatternSet_Basic
=== CONT  TestAccDataSourceAwsWafv2RegexPatternSet_Basic
--- PASS: TestAccDataSourceAwsWafv2RegexPatternSet_Basic (21.41s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       21.777s

@pvanbuijtene pvanbuijtene requested a review from a team April 12, 2020 16:07
@ghost ghost added needs-triage Waiting for first response or review from a maintainer. size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/wafv2 Issues and PRs that pertain to the wafv2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 12, 2020
@pvanbuijtene pvanbuijtene changed the title Wafv2 regex pattern set data source New data source: aws_wafv2_regex_pattern_set Apr 12, 2020
@bflad bflad added new-data-source Introduces a new data source. and removed needs-triage Waiting for first response or review from a maintainer. labels May 1, 2020
@anGie44
Copy link
Contributor

anGie44 commented May 5, 2020

hi @pvanbuijtene, do you mind rebasing to isolate the data_source related changes?

@pvanbuijtene pvanbuijtene force-pushed the wafv2-regex-pattern-set-data-source branch 2 times, most recently from 3ed4e8e to 66ec689 Compare May 7, 2020 20:19
@pvanbuijtene pvanbuijtene requested a review from anGie44 May 8, 2020 20:25
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

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

hi @pvanbuijtene, thanks again for your contributions! please find some follow-up suggestions and comments for your consideration. also if you could omit the resource and references to it in provider.go it would be greatly appreciated :)

}

resp, err := conn.GetRegexPatternSet(&wafv2.GetRegexPatternSetInput{
Id: aws.String(*foundRegexPatternSet.Id),
Copy link
Contributor

@anGie44 anGie44 May 13, 2020

Choose a reason for hiding this comment

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

along the lines of using the AWS SDK's conversion functions, i think ideally we'd want to use aws.StringValue(foundIRegexPatternSet.Id) though this results in 2 conversions..this may be a case where passing the original pointer is permissible @bflad?

aws/data_source_aws_wafv2_regex_pattern_set.go Outdated Show resolved Hide resolved
@pvanbuijtene pvanbuijtene force-pushed the wafv2-regex-pattern-set-data-source branch 2 times, most recently from 99a0e6f to 7246ecc Compare May 14, 2020 21:18
@ghost ghost added size/L Managed by automation to categorize the size of a PR. and removed size/XL Managed by automation to categorize the size of a PR. labels May 14, 2020
@pvanbuijtene
Copy link
Contributor Author

@anGie44 the code has been updated and the resource code is removed, be aware this will break the build and test.

@pvanbuijtene pvanbuijtene requested a review from anGie44 May 14, 2020 21:19
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

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

thanks @pvanbuijtene! changes look great. just noted these 2 documentation changes

website/docs/d/wafv2_regex_pattern_set.html.markdown Outdated Show resolved Hide resolved
website/docs/d/wafv2_regex_pattern_set.html.markdown Outdated Show resolved Hide resolved
@anGie44
Copy link
Contributor

anGie44 commented May 15, 2020

Thanks so much for the changes @pvanbuijtene!

Note: acceptance test run and linting contingent on merge of #12284

@anGie44 anGie44 requested a review from bflad May 18, 2020 19:08
@anGie44 anGie44 added this to the v2.63.0 milestone May 18, 2020
@bflad
Copy link
Contributor

bflad commented May 19, 2020

FYI, there is a CI failure:

# github.com/terraform-providers/terraform-provider-aws/aws
aws/data_source_aws_wafv2_regex_pattern_set.go:108:40: undefined: flattenWafv2RegexPatternSet

@anGie44
Copy link
Contributor

anGie44 commented May 20, 2020

hi @pvanbuijtene, one last rebase and aws.erb update request for you now that master is up-to-date with the corresponding resource 🙏

@pvanbuijtene pvanbuijtene force-pushed the wafv2-regex-pattern-set-data-source branch from d840b86 to 333f2da Compare May 20, 2020 19:52
@anGie44
Copy link
Contributor

anGie44 commented May 20, 2020

awesome, thanks @pvanbuijtene! 🚀

@anGie44 anGie44 merged commit b991607 into hashicorp:master May 20, 2020
anGie44 added a commit that referenced this pull request May 20, 2020
@ghost
Copy link

ghost commented May 22, 2020

This has been released in version 2.63.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 Jun 20, 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 Jun 20, 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. new-data-source Introduces a new data source. provider Pertains to the provider itself, rather than any interaction with AWS. service/wafv2 Issues and PRs that pertain to the wafv2 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.

Feature Request: WAFv2 Regex Pattern Set Data Source
3 participants