diff --git a/aws/route53.go b/aws/route53.go index 1a7f2ac..800ec45 100644 --- a/aws/route53.go +++ b/aws/route53.go @@ -237,15 +237,27 @@ func (m *Route53Module) getRoute53Records() { for _, resourceRecord := range record.ResourceRecords { recordValue := resourceRecord.Value - m.Records = append( - m.Records, - Record{ - AWSService: "Route53", - Name: recordName, - Type: recordType, - Value: aws.ToString(recordValue), - PrivateZone: privateZone, - }) + if record.AliasTarget != nil { + m.Records = append( + m.Records, + Record{ + AWSService: "Route53", + Name: recordName, + Type: fmt.Sprintf("Alias[%s]", recordType), + Value: aws.ToString(record.AliasTarget.DNSName), + PrivateZone: privateZone, + }) + } else { + m.Records = append( + m.Records, + Record{ + AWSService: "Route53", + Name: recordName, + Type: recordType, + Value: aws.ToString(recordValue), + PrivateZone: privateZone, + }) + } } }