Merge pull request #9125 from hashicorp/b-aws-r53-alias-refresh
provider/aws: aws_route53_record alias refresh manually updated record
This commit is contained in:
commit
7cba88931a
|
@ -374,16 +374,15 @@ func resourceAwsRoute53RecordRead(d *schema.ResourceData, meta interface{}) erro
|
||||||
}
|
}
|
||||||
|
|
||||||
if alias := record.AliasTarget; alias != nil {
|
if alias := record.AliasTarget; alias != nil {
|
||||||
if _, ok := d.GetOk("alias"); !ok {
|
name := strings.TrimSuffix(*alias.DNSName, ".")
|
||||||
d.Set("alias", []interface{}{
|
d.Set("alias", []interface{}{
|
||||||
map[string]interface{}{
|
map[string]interface{}{
|
||||||
"zone_id": *alias.HostedZoneId,
|
"zone_id": *alias.HostedZoneId,
|
||||||
"name": *alias.DNSName,
|
"name": name,
|
||||||
"evaluate_target_health": *alias.EvaluateTargetHealth,
|
"evaluate_target_health": *alias.EvaluateTargetHealth,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
d.Set("ttl", record.TTL)
|
d.Set("ttl", record.TTL)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue