-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
resources/aws_route53_record: Fix set_identifier with underscore #13453
Conversation
Closes #13457. |
Hello friends, |
As mentioned in detail in hashicorp#11677 & hashicorp#6298 there was a bug if we supplied a `set_identifier` which should contain an underscore in. This fix changes the logic by searching the first occurrences of underscores to calculate the correct values for each field and as a result for the `set_identifier` as well. The tests included proves that the change doesn't break something and also fixes the aforementioned bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSRoute53Record_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSRoute53Record_ -timeout 180m
=== RUN TestAccAWSRoute53Record_basic
=== PAUSE TestAccAWSRoute53Record_basic
=== RUN TestAccAWSRoute53Record_underscored
=== PAUSE TestAccAWSRoute53Record_underscored
=== RUN TestAccAWSRoute53Record_disappears
=== PAUSE TestAccAWSRoute53Record_disappears
=== RUN TestAccAWSRoute53Record_disappears_MultipleRecords
=== PAUSE TestAccAWSRoute53Record_disappears_MultipleRecords
=== RUN TestAccAWSRoute53Record_basic_fqdn
=== PAUSE TestAccAWSRoute53Record_basic_fqdn
=== RUN TestAccAWSRoute53Record_basic_trailingPeriodAndZoneID
=== PAUSE TestAccAWSRoute53Record_basic_trailingPeriodAndZoneID
=== RUN TestAccAWSRoute53Record_txtSupport
=== PAUSE TestAccAWSRoute53Record_txtSupport
=== RUN TestAccAWSRoute53Record_spfSupport
=== PAUSE TestAccAWSRoute53Record_spfSupport
=== RUN TestAccAWSRoute53Record_caaSupport
=== PAUSE TestAccAWSRoute53Record_caaSupport
=== RUN TestAccAWSRoute53Record_dsSupport
=== PAUSE TestAccAWSRoute53Record_dsSupport
=== RUN TestAccAWSRoute53Record_generatesSuffix
=== PAUSE TestAccAWSRoute53Record_generatesSuffix
=== RUN TestAccAWSRoute53Record_wildcard
=== PAUSE TestAccAWSRoute53Record_wildcard
=== RUN TestAccAWSRoute53Record_failover
=== PAUSE TestAccAWSRoute53Record_failover
=== RUN TestAccAWSRoute53Record_weighted_basic
=== PAUSE TestAccAWSRoute53Record_weighted_basic
=== RUN TestAccAWSRoute53Record_weighted_to_simple_basic
=== PAUSE TestAccAWSRoute53Record_weighted_to_simple_basic
=== RUN TestAccAWSRoute53Record_Alias_Elb
=== PAUSE TestAccAWSRoute53Record_Alias_Elb
=== RUN TestAccAWSRoute53Record_Alias_S3
=== PAUSE TestAccAWSRoute53Record_Alias_S3
=== RUN TestAccAWSRoute53Record_Alias_VpcEndpoint
=== PAUSE TestAccAWSRoute53Record_Alias_VpcEndpoint
=== RUN TestAccAWSRoute53Record_Alias_Uppercase
=== PAUSE TestAccAWSRoute53Record_Alias_Uppercase
=== RUN TestAccAWSRoute53Record_weighted_alias
=== PAUSE TestAccAWSRoute53Record_weighted_alias
=== RUN TestAccAWSRoute53Record_geolocation_basic
=== PAUSE TestAccAWSRoute53Record_geolocation_basic
=== RUN TestAccAWSRoute53Record_HealthCheckId_SetIdentifierChange
=== PAUSE TestAccAWSRoute53Record_HealthCheckId_SetIdentifierChange
=== RUN TestAccAWSRoute53Record_HealthCheckId_TypeChange
=== PAUSE TestAccAWSRoute53Record_HealthCheckId_TypeChange
=== RUN TestAccAWSRoute53Record_latency_basic
=== PAUSE TestAccAWSRoute53Record_latency_basic
=== RUN TestAccAWSRoute53Record_TypeChange
=== PAUSE TestAccAWSRoute53Record_TypeChange
=== RUN TestAccAWSRoute53Record_NameChange
=== PAUSE TestAccAWSRoute53Record_NameChange
=== RUN TestAccAWSRoute53Record_SetIdentifierChange
=== PAUSE TestAccAWSRoute53Record_SetIdentifierChange
=== RUN TestAccAWSRoute53Record_AliasChange
=== PAUSE TestAccAWSRoute53Record_AliasChange
=== RUN TestAccAWSRoute53Record_empty
=== PAUSE TestAccAWSRoute53Record_empty
=== RUN TestAccAWSRoute53Record_longTXTrecord
=== PAUSE TestAccAWSRoute53Record_longTXTrecord
=== RUN TestAccAWSRoute53Record_multivalue_answer_basic
=== PAUSE TestAccAWSRoute53Record_multivalue_answer_basic
=== RUN TestAccAWSRoute53Record_doNotAllowOverwrite
=== PAUSE TestAccAWSRoute53Record_doNotAllowOverwrite
=== RUN TestAccAWSRoute53Record_allowOverwrite
=== PAUSE TestAccAWSRoute53Record_allowOverwrite
=== CONT TestAccAWSRoute53Record_basic
=== CONT TestAccAWSRoute53Record_Alias_VpcEndpoint
=== CONT TestAccAWSRoute53Record_Alias_Elb
=== CONT TestAccAWSRoute53Record_basic_fqdn
=== CONT TestAccAWSRoute53Record_spfSupport
=== CONT TestAccAWSRoute53Record_Alias_S3
=== CONT TestAccAWSRoute53Record_caaSupport
=== CONT TestAccAWSRoute53Record_basic_trailingPeriodAndZoneID
=== CONT TestAccAWSRoute53Record_disappears_MultipleRecords
=== CONT TestAccAWSRoute53Record_dsSupport
=== CONT TestAccAWSRoute53Record_allowOverwrite
=== CONT TestAccAWSRoute53Record_doNotAllowOverwrite
=== CONT TestAccAWSRoute53Record_multivalue_answer_basic
=== CONT TestAccAWSRoute53Record_longTXTrecord
=== CONT TestAccAWSRoute53Record_empty
=== CONT TestAccAWSRoute53Record_AliasChange
=== CONT TestAccAWSRoute53Record_SetIdentifierChange
=== CONT TestAccAWSRoute53Record_txtSupport
=== CONT TestAccAWSRoute53Record_NameChange
=== CONT TestAccAWSRoute53Record_TypeChange
--- PASS: TestAccAWSRoute53Record_Alias_Elb (130.57s)
=== CONT TestAccAWSRoute53Record_failover
--- PASS: TestAccAWSRoute53Record_doNotAllowOverwrite (138.19s)
=== CONT TestAccAWSRoute53Record_latency_basic
--- PASS: TestAccAWSRoute53Record_caaSupport (144.54s)
=== CONT TestAccAWSRoute53Record_weighted_to_simple_basic
--- PASS: TestAccAWSRoute53Record_basic_trailingPeriodAndZoneID (154.87s)
=== CONT TestAccAWSRoute53Record_HealthCheckId_TypeChange
--- PASS: TestAccAWSRoute53Record_longTXTrecord (155.14s)
=== CONT TestAccAWSRoute53Record_weighted_basic
--- PASS: TestAccAWSRoute53Record_txtSupport (165.90s)
=== CONT TestAccAWSRoute53Record_HealthCheckId_SetIdentifierChange
--- PASS: TestAccAWSRoute53Record_basic (167.35s)
=== CONT TestAccAWSRoute53Record_geolocation_basic
--- PASS: TestAccAWSRoute53Record_empty (168.11s)
=== CONT TestAccAWSRoute53Record_disappears
--- PASS: TestAccAWSRoute53Record_spfSupport (172.19s)
=== CONT TestAccAWSRoute53Record_weighted_alias
--- PASS: TestAccAWSRoute53Record_multivalue_answer_basic (175.98s)
=== CONT TestAccAWSRoute53Record_Alias_Uppercase
--- PASS: TestAccAWSRoute53Record_Alias_S3 (177.15s)
=== CONT TestAccAWSRoute53Record_generatesSuffix
--- PASS: TestAccAWSRoute53Record_dsSupport (179.82s)
=== CONT TestAccAWSRoute53Record_wildcard
--- PASS: TestAccAWSRoute53Record_basic_fqdn (181.24s)
=== CONT TestAccAWSRoute53Record_underscored
--- PASS: TestAccAWSRoute53Record_SetIdentifierChange (190.84s)
--- PASS: TestAccAWSRoute53Record_disappears_MultipleRecords (217.51s)
--- PASS: TestAccAWSRoute53Record_AliasChange (219.00s)
--- PASS: TestAccAWSRoute53Record_allowOverwrite (225.86s)
--- PASS: TestAccAWSRoute53Record_TypeChange (232.18s)
--- PASS: TestAccAWSRoute53Record_NameChange (277.80s)
--- PASS: TestAccAWSRoute53Record_failover (151.22s)
--- PASS: TestAccAWSRoute53Record_latency_basic (151.95s)
--- PASS: TestAccAWSRoute53Record_weighted_basic (136.28s)
--- PASS: TestAccAWSRoute53Record_generatesSuffix (135.22s)
--- PASS: TestAccAWSRoute53Record_disappears (145.73s)
--- PASS: TestAccAWSRoute53Record_weighted_to_simple_basic (171.57s)
--- PASS: TestAccAWSRoute53Record_Alias_Uppercase (141.89s)
--- PASS: TestAccAWSRoute53Record_underscored (138.52s)
--- PASS: TestAccAWSRoute53Record_geolocation_basic (160.58s)
--- PASS: TestAccAWSRoute53Record_HealthCheckId_TypeChange (176.85s)
--- PASS: TestAccAWSRoute53Record_wildcard (204.54s)
--- PASS: TestAccAWSRoute53Record_HealthCheckId_SetIdentifierChange (253.20s)
--- PASS: TestAccAWSRoute53Record_weighted_alias (297.85s)
--- PASS: TestAccAWSRoute53Record_Alias_VpcEndpoint (570.23s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 573.903s
@angeloskaltsikis Thanks for the contribution 🎉 👏. |
This functionality has been released in v3.57.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. Thank you! |
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. |
As mentioned in detail in #11677
& #6298
there was a bug if we supplied a
set_identifier
which should contain anunderscore in.
This fix changes the logic by searching the first occurrences of underscores
to calculate the correct values for each field and as a result for the
set_identifier
as well.The tests included proves that the change doesn't break something and also
fixes the aforementioned bug.
Community Note
Closes #11677
Release note for CHANGELOG:
Output from acceptance testing: