Skip to content

Commit

Permalink
fix bug with route53 alias record processing
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicBreuker committed Nov 13, 2024
1 parent 00fe4fd commit ab4866f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions aws/route53.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,19 @@ func (m *Route53Module) getRoute53Records() {
recordName = aws.ToString(record.Name)
recordType = string(record.Type)

for _, resourceRecord := range record.ResourceRecords {
recordValue := resourceRecord.Value
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 {
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 {
for _, resourceRecord := range record.ResourceRecords {
recordValue := resourceRecord.Value
m.Records = append(
m.Records,
Record{
Expand All @@ -258,8 +258,8 @@ func (m *Route53Module) getRoute53Records() {
PrivateZone: privateZone,
})
}

}

}

}
Expand Down

0 comments on commit ab4866f

Please sign in to comment.