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

r/aws_route53_record: Correct fqdn for wildcard records #40868

Merged
merged 11 commits into from
Jan 10, 2025

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Jan 10, 2025

Description

Restores pre-v5.83.0 behavior for the fqdn attribute with wildcard domain names.

Relations

Closes #40851.
Relates #40154.

Output from Acceptance Testing

Before

% make testacc TESTARGS='-run=TestAccRoute53Record_wildcard' PKG=route53
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/route53/... -v -count 1 -parallel 20  -run=TestAccRoute53Record_wildcard -timeout 360m
2025/01/10 08:51:16 Initializing Terraform AWS Provider...
=== RUN   TestAccRoute53Record_wildcard
=== PAUSE TestAccRoute53Record_wildcard
=== CONT  TestAccRoute53Record_wildcard
    record_test.go:371: Step 1/3 error: Post-apply refresh state check(s) failed:
        error checking value for attribute at path: aws_route53_record.wildcard.fqdn, err: expected value *.domain.test for StringExact check, got: \052.domain.test
--- FAIL: TestAccRoute53Record_wildcard (167.02s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/route53	172.807s
FAIL
make: *** [testacc] Error 1

After

% make testacc TESTARGS='-run=TestAccRoute53Record_' PKG=route53 ACCTEST_PARALLELISM=4
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/route53/... -v -count 1 -parallel 4  -run=TestAccRoute53Record_ -timeout 360m
2025/01/10 10:01:04 Initializing Terraform AWS Provider...
=== RUN   TestAccRoute53Record_basic
=== PAUSE TestAccRoute53Record_basic
=== RUN   TestAccRoute53Record_disappears
=== PAUSE TestAccRoute53Record_disappears
=== RUN   TestAccRoute53Record_Disappears_multipleRecords
=== PAUSE TestAccRoute53Record_Disappears_multipleRecords
=== RUN   TestAccRoute53Record_underscored
=== PAUSE TestAccRoute53Record_underscored
=== RUN   TestAccRoute53Record_fqdn
=== PAUSE TestAccRoute53Record_fqdn
=== RUN   TestAccRoute53Record_trailingPeriodAndZoneID
=== PAUSE TestAccRoute53Record_trailingPeriodAndZoneID
=== RUN   TestAccRoute53Record_Support_txt
=== PAUSE TestAccRoute53Record_Support_txt
=== RUN   TestAccRoute53Record_Support_spf
=== PAUSE TestAccRoute53Record_Support_spf
=== RUN   TestAccRoute53Record_Support_caa
=== PAUSE TestAccRoute53Record_Support_caa
=== RUN   TestAccRoute53Record_Support_ds
=== PAUSE TestAccRoute53Record_Support_ds
=== RUN   TestAccRoute53Record_generatesSuffix
=== PAUSE TestAccRoute53Record_generatesSuffix
=== RUN   TestAccRoute53Record_wildcard
=== PAUSE TestAccRoute53Record_wildcard
=== RUN   TestAccRoute53Record_failover
=== PAUSE TestAccRoute53Record_failover
=== RUN   TestAccRoute53Record_Weighted_basic
=== PAUSE TestAccRoute53Record_Weighted_basic
=== RUN   TestAccRoute53Record_WeightedToSimple_basic
=== PAUSE TestAccRoute53Record_WeightedToSimple_basic
=== RUN   TestAccRoute53Record_Alias_elb
=== PAUSE TestAccRoute53Record_Alias_elb
=== RUN   TestAccRoute53Record_Alias_s3
=== PAUSE TestAccRoute53Record_Alias_s3
=== RUN   TestAccRoute53Record_Alias_vpcEndpoint
=== PAUSE TestAccRoute53Record_Alias_vpcEndpoint
=== RUN   TestAccRoute53Record_Alias_uppercase
=== PAUSE TestAccRoute53Record_Alias_uppercase
=== RUN   TestAccRoute53Record_Weighted_alias
=== PAUSE TestAccRoute53Record_Weighted_alias
=== RUN   TestAccRoute53Record_cidr
=== PAUSE TestAccRoute53Record_cidr
=== RUN   TestAccRoute53Record_Geolocation_basic
=== PAUSE TestAccRoute53Record_Geolocation_basic
=== RUN   TestAccRoute53Record_Geoproximity_basic
=== PAUSE TestAccRoute53Record_Geoproximity_basic
=== RUN   TestAccRoute53Record_HealthCheckID_setIdentifierChange
=== PAUSE TestAccRoute53Record_HealthCheckID_setIdentifierChange
=== RUN   TestAccRoute53Record_HealthCheckID_typeChange
=== PAUSE TestAccRoute53Record_HealthCheckID_typeChange
=== RUN   TestAccRoute53Record_Latency_basic
=== PAUSE TestAccRoute53Record_Latency_basic
=== RUN   TestAccRoute53Record_typeChange
=== PAUSE TestAccRoute53Record_typeChange
=== RUN   TestAccRoute53Record_nameChange
=== PAUSE TestAccRoute53Record_nameChange
=== RUN   TestAccRoute53Record_setIdentifierChangeBasicToWeighted
=== PAUSE TestAccRoute53Record_setIdentifierChangeBasicToWeighted
=== RUN   TestAccRoute53Record_SetIdentifierRename_geolocationContinent
=== PAUSE TestAccRoute53Record_SetIdentifierRename_geolocationContinent
=== RUN   TestAccRoute53Record_SetIdentifierRename_geolocationCountryDefault
=== PAUSE TestAccRoute53Record_SetIdentifierRename_geolocationCountryDefault
=== RUN   TestAccRoute53Record_SetIdentifierRename_geolocationCountrySpecified
=== PAUSE TestAccRoute53Record_SetIdentifierRename_geolocationCountrySpecified
=== RUN   TestAccRoute53Record_SetIdentifierRename_geolocationCountrySubdivision
=== PAUSE TestAccRoute53Record_SetIdentifierRename_geolocationCountrySubdivision
=== RUN   TestAccRoute53Record_SetIdentifierRename_geoproximityRegion
=== PAUSE TestAccRoute53Record_SetIdentifierRename_geoproximityRegion
=== RUN   TestAccRoute53Record_SetIdentifierRename_geoproximityLocalZoneGroup
=== PAUSE TestAccRoute53Record_SetIdentifierRename_geoproximityLocalZoneGroup
=== RUN   TestAccRoute53Record_SetIdentifierRename_geoproximityCoordinates
=== PAUSE TestAccRoute53Record_SetIdentifierRename_geoproximityCoordinates
=== RUN   TestAccRoute53Record_SetIdentifierRename_failover
=== PAUSE TestAccRoute53Record_SetIdentifierRename_failover
=== RUN   TestAccRoute53Record_SetIdentifierRename_latency
=== PAUSE TestAccRoute53Record_SetIdentifierRename_latency
=== RUN   TestAccRoute53Record_SetIdentifierRename_multiValueAnswer
=== PAUSE TestAccRoute53Record_SetIdentifierRename_multiValueAnswer
=== RUN   TestAccRoute53Record_SetIdentifierRename_weighted
=== PAUSE TestAccRoute53Record_SetIdentifierRename_weighted
=== RUN   TestAccRoute53Record_Alias_change
=== PAUSE TestAccRoute53Record_Alias_change
=== RUN   TestAccRoute53Record_Alias_changeDualstack
=== PAUSE TestAccRoute53Record_Alias_changeDualstack
=== RUN   TestAccRoute53Record_empty
=== PAUSE TestAccRoute53Record_empty
=== RUN   TestAccRoute53Record_longTXTrecord
=== PAUSE TestAccRoute53Record_longTXTrecord
=== RUN   TestAccRoute53Record_MultiValueAnswer_basic
=== PAUSE TestAccRoute53Record_MultiValueAnswer_basic
=== RUN   TestAccRoute53Record_Allow_doNotOverwrite
=== PAUSE TestAccRoute53Record_Allow_doNotOverwrite
=== RUN   TestAccRoute53Record_Allow_overwrite
=== PAUSE TestAccRoute53Record_Allow_overwrite
=== RUN   TestAccRoute53Record_ttl0
=== PAUSE TestAccRoute53Record_ttl0
=== RUN   TestAccRoute53Record_aliasWildcardName
=== PAUSE TestAccRoute53Record_aliasWildcardName
=== RUN   TestAccRoute53Record_escapedSlash
=== PAUSE TestAccRoute53Record_escapedSlash
=== RUN   TestAccRoute53Record_escapedSpace
=== PAUSE TestAccRoute53Record_escapedSpace
=== RUN   TestAccRoute53Record_escapedJustSpace
=== PAUSE TestAccRoute53Record_escapedJustSpace
=== CONT  TestAccRoute53Record_basic
=== CONT  TestAccRoute53Record_typeChange
=== CONT  TestAccRoute53Record_SetIdentifierRename_weighted
=== CONT  TestAccRoute53Record_escapedJustSpace
--- PASS: TestAccRoute53Record_basic (164.10s)
=== CONT  TestAccRoute53Record_escapedSpace
--- PASS: TestAccRoute53Record_escapedJustSpace (167.69s)
=== CONT  TestAccRoute53Record_escapedSlash
--- PASS: TestAccRoute53Record_SetIdentifierRename_weighted (193.45s)
=== CONT  TestAccRoute53Record_aliasWildcardName
--- PASS: TestAccRoute53Record_typeChange (216.09s)
=== CONT  TestAccRoute53Record_ttl0
--- PASS: TestAccRoute53Record_escapedSlash (166.98s)
=== CONT  TestAccRoute53Record_Allow_overwrite
--- PASS: TestAccRoute53Record_escapedSpace (176.40s)
=== CONT  TestAccRoute53Record_Allow_doNotOverwrite
--- PASS: TestAccRoute53Record_ttl0 (238.38s)
=== CONT  TestAccRoute53Record_MultiValueAnswer_basic
--- PASS: TestAccRoute53Record_Allow_doNotOverwrite (162.06s)
=== CONT  TestAccRoute53Record_longTXTrecord
--- PASS: TestAccRoute53Record_Allow_overwrite (206.04s)
=== CONT  TestAccRoute53Record_empty
--- PASS: TestAccRoute53Record_MultiValueAnswer_basic (166.73s)
=== CONT  TestAccRoute53Record_Alias_changeDualstack
--- PASS: TestAccRoute53Record_longTXTrecord (147.42s)
=== CONT  TestAccRoute53Record_Alias_change
--- PASS: TestAccRoute53Record_aliasWildcardName (516.65s)
=== CONT  TestAccRoute53Record_SetIdentifierRename_geolocationCountryDefault
--- PASS: TestAccRoute53Record_empty (177.84s)
=== CONT  TestAccRoute53Record_SetIdentifierRename_geolocationCountrySubdivision
--- PASS: TestAccRoute53Record_Alias_changeDualstack (233.08s)
=== CONT  TestAccRoute53Record_SetIdentifierRename_failover
--- PASS: TestAccRoute53Record_Alias_change (211.46s)
=== CONT  TestAccRoute53Record_SetIdentifierRename_geoproximityRegion
--- PASS: TestAccRoute53Record_SetIdentifierRename_geolocationCountrySubdivision (200.04s)
=== CONT  TestAccRoute53Record_SetIdentifierRename_multiValueAnswer
--- PASS: TestAccRoute53Record_SetIdentifierRename_geolocationCountryDefault (223.44s)
=== CONT  TestAccRoute53Record_SetIdentifierRename_geolocationCountrySpecified
--- PASS: TestAccRoute53Record_SetIdentifierRename_geoproximityRegion (186.02s)
=== CONT  TestAccRoute53Record_SetIdentifierRename_latency
--- PASS: TestAccRoute53Record_SetIdentifierRename_failover (193.75s)
=== CONT  TestAccRoute53Record_SetIdentifierRename_geoproximityCoordinates
--- PASS: TestAccRoute53Record_SetIdentifierRename_geolocationCountrySpecified (176.40s)
=== CONT  TestAccRoute53Record_SetIdentifierRename_geoproximityLocalZoneGroup
--- PASS: TestAccRoute53Record_SetIdentifierRename_multiValueAnswer (216.66s)
=== CONT  TestAccRoute53Record_setIdentifierChangeBasicToWeighted
--- PASS: TestAccRoute53Record_SetIdentifierRename_latency (177.02s)
=== CONT  TestAccRoute53Record_SetIdentifierRename_geolocationContinent
--- PASS: TestAccRoute53Record_setIdentifierChangeBasicToWeighted (206.15s)
=== CONT  TestAccRoute53Record_Weighted_basic
--- PASS: TestAccRoute53Record_SetIdentifierRename_geoproximityCoordinates (204.61s)
=== CONT  TestAccRoute53Record_cidr
--- PASS: TestAccRoute53Record_SetIdentifierRename_geoproximityLocalZoneGroup (178.15s)
=== CONT  TestAccRoute53Record_Weighted_alias
--- PASS: TestAccRoute53Record_SetIdentifierRename_geolocationContinent (194.94s)
=== CONT  TestAccRoute53Record_Latency_basic
--- PASS: TestAccRoute53Record_Weighted_basic (169.62s)
=== CONT  TestAccRoute53Record_Alias_uppercase
--- PASS: TestAccRoute53Record_cidr (251.48s)
=== CONT  TestAccRoute53Record_HealthCheckID_typeChange
--- PASS: TestAccRoute53Record_Weighted_alias (283.07s)
=== CONT  TestAccRoute53Record_Alias_vpcEndpoint
--- PASS: TestAccRoute53Record_Alias_uppercase (168.70s)
=== CONT  TestAccRoute53Record_HealthCheckID_setIdentifierChange
--- PASS: TestAccRoute53Record_Latency_basic (173.59s)
=== CONT  TestAccRoute53Record_Alias_s3
--- PASS: TestAccRoute53Record_HealthCheckID_typeChange (205.55s)
=== CONT  TestAccRoute53Record_Geoproximity_basic
--- PASS: TestAccRoute53Record_Alias_s3 (166.88s)
=== CONT  TestAccRoute53Record_Alias_elb
--- PASS: TestAccRoute53Record_HealthCheckID_setIdentifierChange (198.95s)
=== CONT  TestAccRoute53Record_Geolocation_basic
--- PASS: TestAccRoute53Record_Geoproximity_basic (171.07s)
=== CONT  TestAccRoute53Record_WeightedToSimple_basic
--- PASS: TestAccRoute53Record_Alias_elb (160.65s)
=== CONT  TestAccRoute53Record_generatesSuffix
--- PASS: TestAccRoute53Record_Alias_vpcEndpoint (371.42s)
=== CONT  TestAccRoute53Record_Support_ds
--- PASS: TestAccRoute53Record_Geolocation_basic (190.70s)
=== CONT  TestAccRoute53Record_failover
--- PASS: TestAccRoute53Record_WeightedToSimple_basic (195.36s)
=== CONT  TestAccRoute53Record_Support_caa
--- PASS: TestAccRoute53Record_generatesSuffix (173.52s)
=== CONT  TestAccRoute53Record_wildcard
--- PASS: TestAccRoute53Record_Support_ds (178.56s)
=== CONT  TestAccRoute53Record_Support_spf
--- PASS: TestAccRoute53Record_failover (150.07s)
=== CONT  TestAccRoute53Record_nameChange
--- PASS: TestAccRoute53Record_Support_caa (149.65s)
=== CONT  TestAccRoute53Record_Support_txt
--- PASS: TestAccRoute53Record_Support_spf (176.20s)
=== CONT  TestAccRoute53Record_Disappears_multipleRecords
--- PASS: TestAccRoute53Record_wildcard (231.78s)
=== CONT  TestAccRoute53Record_underscored
--- PASS: TestAccRoute53Record_Support_txt (152.86s)
=== CONT  TestAccRoute53Record_trailingPeriodAndZoneID
--- PASS: TestAccRoute53Record_nameChange (258.67s)
=== CONT  TestAccRoute53Record_disappears
--- PASS: TestAccRoute53Record_underscored (176.04s)
=== CONT  TestAccRoute53Record_fqdn
--- PASS: TestAccRoute53Record_Disappears_multipleRecords (206.91s)
--- PASS: TestAccRoute53Record_disappears (150.39s)
--- PASS: TestAccRoute53Record_trailingPeriodAndZoneID (161.05s)
--- PASS: TestAccRoute53Record_fqdn (172.23s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/route53	2679.547s

% make testacc TESTARGS='-run=TestAccRoute53Record_wildcard' PKG=route53
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/route53/... -v -count 1 -parallel 20  -run=TestAccRoute53Record_wildcard -timeout 360m
2025/01/10 08:51:16 Initializing Terraform AWS Provider...
=== RUN   TestAccRoute53Record_wildcard
=== PAUSE TestAccRoute53Record_wildcard
=== CONT  TestAccRoute53Record_wildcard
    record_test.go:371: Step 1/3 error: Post-apply refresh state check(s) failed:
        error checking value for attribute at path: aws_route53_record.wildcard.fqdn, err: expected value *.domain.test for StringExact check, got: \052.domain.test
--- FAIL: TestAccRoute53Record_wildcard (167.02s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/route53	172.807s
FAIL
make: *** [testacc] Error 1
% make testacc TESTARGS='-run=TestAccRoute53Record_wildcard\|TestAccRoute53Record_basic' PKG=route53
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/route53/... -v -count 1 -parallel 20  -run=TestAccRoute53Record_wildcard\|TestAccRoute53Record_basic -timeout 360m
2025/01/10 09:48:21 Initializing Terraform AWS Provider...
=== RUN   TestAccRoute53Record_basic
=== PAUSE TestAccRoute53Record_basic
=== RUN   TestAccRoute53Record_wildcard
=== PAUSE TestAccRoute53Record_wildcard
=== CONT  TestAccRoute53Record_basic
=== CONT  TestAccRoute53Record_wildcard
--- PASS: TestAccRoute53Record_basic (153.27s)
--- PASS: TestAccRoute53Record_wildcard (223.81s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/route53	229.324s
@ewbankkit ewbankkit requested a review from a team as a code owner January 10, 2025 14:59
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.

Copy link

Thank you for your contribution! 🚀

Please note that the CHANGELOG.md file contents are handled by the maintainers during merge. This is to prevent pull request merge conflicts, especially for contributions which may not be merged immediately. Please see the Contributing Guide for additional pull request review items.

Remove any changes to the CHANGELOG.md file and commit them in this pull request to prevent delays with reviewing and potentially merging this pull request.

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/route53 Issues and PRs that pertain to the route53 service. provider Pertains to the provider itself, rather than any interaction with AWS. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Jan 10, 2025
Copy link

Thank you for your contribution! 🚀

Please note that the CHANGELOG.md file contents are handled by the maintainers during merge. This is to prevent pull request merge conflicts, especially for contributions which may not be merged immediately. Please see the Contributing Guide for additional pull request review items.

Remove any changes to the CHANGELOG.md file and commit them in this pull request to prevent delays with reviewing and potentially merging this pull request.

Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

% make testacc PKG=route53 TESTS=TestAccRoute53Record_wildcard
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/route53/... -v -count 1 -parallel 20 -run='TestAccRoute53Record_wildcard'  -timeout 360m
2025/01/10 10:16:55 Initializing Terraform AWS Provider...
=== RUN   TestAccRoute53Record_wildcard
=== PAUSE TestAccRoute53Record_wildcard
=== CONT  TestAccRoute53Record_wildcard
--- PASS: TestAccRoute53Record_wildcard (228.31s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/route53    233.553s

@ewbankkit ewbankkit merged commit 40a106d into main Jan 10, 2025
50 checks passed
@ewbankkit ewbankkit deleted the b-route53-domain-wildcard branch January 10, 2025 16:11
terraform-aws-provider bot pushed a commit that referenced this pull request Jan 10, 2025
@ewbankkit ewbankkit added this to the v5.83.1 milestone Jan 10, 2025
Copy link

This functionality has been released in v5.83.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 Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/route53 Issues and PRs that pertain to the route53 service. 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]: Route53 record alias name with wildcard (*) incorrectly shows as \\052
2 participants