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: permit both name and zone_id arguments #37686

Merged
merged 1 commit into from
May 24, 2024

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented May 24, 2024

Description

As part of the migration of the route53 service to AWS SDK V2, an ExactlyOneOf constraint was added to the name and zone_id arguments in the aws_route53_zone data source. This is technically a regression as the data source functioned correctly in earlier versions when name is set and zone_id is an empty string. This change reverts the constraint and adds an acceptance test to cover this potential configuration.

Relations

Closes #37683
Relates #37510

References

Output from Acceptance Testing

% make testacc PKG=route53 TESTS=TestAccRoute53ZoneDataSource_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/route53/... -v -count 1 -parallel 20 -run='TestAccRoute53ZoneDataSource_'  -timeout 360m

--- PASS: TestAccRoute53ZoneDataSource_id (91.23s)
--- PASS: TestAccRoute53ZoneDataSource_name_idEmptyString (95.31s)
--- PASS: TestAccRoute53ZoneDataSource_name (101.49s)
--- PASS: TestAccRoute53ZoneDataSource_serviceDiscovery (102.80s)
--- PASS: TestAccRoute53ZoneDataSource_vpc (126.11s)
--- PASS: TestAccRoute53ZoneDataSource_tags (127.60s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/route53    132.691s

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@jar-b jar-b added the regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. label May 24, 2024
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/route53 Issues and PRs that pertain to the route53 service. labels May 24, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label May 24, 2024
As part of the migration of the `route53` service to AWS SDK V2, an `ExactlyOneOf` constraint was added to the `name` and `zone_id` arguments in the `aws_route53_zone` data source. This is technically a regression as the data source functioned correctly in earlier versions when `name` is set and `zone_id` is an empty string. This change reverts the constraint and adds an acceptance test to cover this potential configuration.

```console
% make testacc PKG=route53 TESTS=TestAccRoute53ZoneDataSource_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/route53/... -v -count 1 -parallel 20 -run='TestAccRoute53ZoneDataSource_'  -timeout 360m

--- PASS: TestAccRoute53ZoneDataSource_id (91.23s)
--- PASS: TestAccRoute53ZoneDataSource_name_idEmptyString (95.31s)
--- PASS: TestAccRoute53ZoneDataSource_name (101.49s)
--- PASS: TestAccRoute53ZoneDataSource_serviceDiscovery (102.80s)
--- PASS: TestAccRoute53ZoneDataSource_vpc (126.11s)
--- PASS: TestAccRoute53ZoneDataSource_tags (127.60s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/route53    132.691s
```
@jar-b jar-b force-pushed the b-route53_zone-ds-empty-string-id branch from fcc4378 to cb15f51 Compare May 24, 2024 14:18
@jar-b jar-b marked this pull request as ready for review May 24, 2024 14:52
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@jar-b jar-b merged commit a6e037b into main May 24, 2024
47 checks passed
@jar-b jar-b deleted the b-route53_zone-ds-empty-string-id branch May 24, 2024 15:04
@github-actions github-actions bot added this to the v5.52.0 milestone May 24, 2024
@jar-b jar-b modified the milestones: v5.52.0, v5.51.1 May 24, 2024
github-actions bot pushed a commit that referenced this pull request May 24, 2024
Copy link

This functionality has been released in v5.51.1 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. Thank you!

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label May 30, 2024
Copy link

github-actions bot commented Jul 1, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.

[Bug]: aws_route53_zone data source does not accept empty string inputs to zone_id and name anymore
2 participants