Skip to content

Commit

Permalink
r/aws_route53_record: Don't API-normalize any '*' as the leftmost lab…
Browse files Browse the repository at this point in the history
…el in 'fqdn'.
  • Loading branch information
ewbankkit committed Jan 10, 2025
1 parent 12098ca commit d8859d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/service/route53/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,12 @@ func resourceRecordRead(ctx context.Context, d *schema.ResourceData, meta interf
return sdkdiag.AppendErrorf(diags, "setting failover_routing_policy: %s", err)
}
}
// findResourceRecordSetByFourPartKey returns the FQDN in API-normalized form.
// For backwards compatibility, restore any '*' as the leftmost label in the domain name.
// \052 is the octal representation of '*'.
if v := aws.ToString(fqdn); strings.HasPrefix(v, `\052.`) {
fqdn = aws.String(`*.` + strings.TrimPrefix(v, `\052.`))
}
d.Set("fqdn", fqdn)
if geoLocation := record.GeoLocation; geoLocation != nil {
tfList := []interface{}{map[string]interface{}{
Expand Down

0 comments on commit d8859d8

Please sign in to comment.