Skip to content

Commit

Permalink
Merge pull request #5312 from terraform-providers/b-aws_route53_recor…
Browse files Browse the repository at this point in the history
…d-expand-double-period

resource/aws_route53_record: Prevent DomainLabelEmpty errors when expanding record names with trailing period
  • Loading branch information
bflad authored Jul 24, 2018
2 parents bfd9961 + e800496 commit 4e84c6d
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 4e84c6d

Please sign in to comment.