Skip to content

Commit

Permalink
resource/aws_route53_record: Prevent DomainLabelEmpty errors when exp…
Browse files Browse the repository at this point in the history
…anding record names with trailing period
  • Loading branch information
bflad committed Jul 24, 2018
1 parent bfd9961 commit e800496
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aws/resource_aws_route53_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ func expandRecordName(name, zone string) string {
if len(name) == 0 {
rn = zone
} else {
rn = strings.Join([]string{name, zone}, ".")
rn = strings.Join([]string{rn, zone}, ".")
}
}
return rn
Expand Down
1 change: 1 addition & 0 deletions aws/resource_aws_route53_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func TestExpandRecordName(t *testing.T) {
Input, Output string
}{
{"www", "www.nonexample.com"},
{"www.", "www.nonexample.com"},
{"dev.www", "dev.www.nonexample.com"},
{"*", "*.nonexample.com"},
{"nonexample.com", "nonexample.com"},
Expand Down

0 comments on commit e800496

Please sign in to comment.