mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
provider/aws: Fix issue with Route53 and TXT records
This commit is contained in:
parent
f4808b1ea7
commit
346ff12bc5
@ -261,9 +261,16 @@ func resourceAwsRoute53RecordBuildSet(d *schema.ResourceData) (*route53.Resource
|
||||
recs := d.Get("records").(*schema.Set).List()
|
||||
records := make([]route53.ResourceRecord, 0, len(recs))
|
||||
|
||||
typeStr := d.Get("type").(string)
|
||||
for _, r := range recs {
|
||||
switch typeStr {
|
||||
case "TXT":
|
||||
str := fmt.Sprintf("\"%s\"", r.(string))
|
||||
records = append(records, route53.ResourceRecord{Value: aws.String(str)})
|
||||
default:
|
||||
records = append(records, route53.ResourceRecord{Value: aws.String(r.(string))})
|
||||
}
|
||||
}
|
||||
|
||||
rec := &route53.ResourceRecordSet{
|
||||
Name: aws.String(d.Get("name").(string)),
|
||||
|
Loading…
Reference in New Issue
Block a user