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

d/aws_route53_zone: Filter on tags is containment, not exact equality #11953

Merged
merged 1 commit into from
Feb 11, 2020

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Feb 7, 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 #11950.

Release note for CHANGELOG:

data-source/aws_route53_zone: Fixes regression from version 2.48.0 when filtering using `tags`

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccDataSourceAwsRoute53Zone_tags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAwsRoute53Zone_tags -timeout 120m
=== RUN   TestAccDataSourceAwsRoute53Zone_tags
=== PAUSE TestAccDataSourceAwsRoute53Zone_tags
=== CONT  TestAccDataSourceAwsRoute53Zone_tags
--- PASS: TestAccDataSourceAwsRoute53Zone_tags (96.01s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	96.044s

@ewbankkit ewbankkit requested a review from a team February 7, 2020 13:53
@ghost ghost added size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/route53 Issues and PRs that pertain to the route53 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Feb 7, 2020
@ewbankkit
Copy link
Contributor Author

ewbankkit commented Feb 7, 2020

The updated test case without the corresponding fix gives:

$ make testacc TEST=./aws TESTARGS='-run=TestAccDataSourceAwsRoute53Zone_tags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAwsRoute53Zone_tags -timeout 120m
=== RUN   TestAccDataSourceAwsRoute53Zone_tags
=== PAUSE TestAccDataSourceAwsRoute53Zone_tags
=== CONT  TestAccDataSourceAwsRoute53Zone_tags
--- FAIL: TestAccDataSourceAwsRoute53Zone_tags (78.85s)
    testing.go:640: Step 0 error: errors during apply:
        
        Error: no matching Route53Zone found
        
          on /tmp/tf-test064323633/main.tf line 22:
          (source code not available)
        
        
    testing.go:701: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.
        
        Error: errors during refresh: no matching Route53Zone found
        
        State: <nil>
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	78.928s
FAIL
GNUmakefile:24: recipe for target 'testacc' failed
make: *** [testacc] Error 1

@bflad bflad added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Feb 10, 2020
@bflad bflad self-assigned this Feb 10, 2020
@bflad
Copy link
Contributor

bflad commented Feb 10, 2020

I think this should be good to go once the merge conflicts are sorted. 👍

@bflad bflad added the regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. label Feb 10, 2020
@bflad bflad added this to the v2.49.0 milestone Feb 10, 2020
@ewbankkit
Copy link
Contributor Author

Rebased to remove merge conflicts.
Re-ran acceptance test:

% make testacc TEST=./aws TESTARGS='-run=TestAccDataSourceAwsRoute53Zone_tags'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAwsRoute53Zone_tags -timeout 120m
=== RUN   TestAccDataSourceAwsRoute53Zone_tags
=== PAUSE TestAccDataSourceAwsRoute53Zone_tags
=== CONT  TestAccDataSourceAwsRoute53Zone_tags
--- PASS: TestAccDataSourceAwsRoute53Zone_tags (120.91s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	122.219s

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 great, thanks for this fix (and nice enhancement to keyvaluetags to help other resources with this problem in the future), @ewbankkit 🚀

Output from acceptance testing:

--- PASS: TestAccDataSourceAwsRoute53Zone_name (53.44s)
--- PASS: TestAccDataSourceAwsRoute53Zone_id (53.47s)
--- PASS: TestAccDataSourceAwsRoute53Zone_vpc (92.55s)
--- PASS: TestAccDataSourceAwsRoute53Zone_tags (93.48s)
--- PASS: TestAccDataSourceAwsRoute53Zone_serviceDiscovery (102.37s)

@bflad bflad merged commit 6762748 into hashicorp:master Feb 11, 2020
bflad added a commit that referenced this pull request Feb 11, 2020
@ewbankkit ewbankkit deleted the issue-11950 branch February 11, 2020 18:57
@ghost
Copy link

ghost commented Feb 14, 2020

This has been released in version 2.49.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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/route53 Issues and PRs that pertain to the route53 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.

Version 2.48.0 broke the aws_route53_zone data lookup based on tags
2 participants