* aws_route53_record.ns: [ERR]: Error building changeset: InvalidChangeBatch: [Tried to create resource record set [name='app1.example.com.', type='NS'] but it already exists]
status code: 400, request id: XXXXXX
The resource aws_route53_record requires an allow_overwrite = true.
resource "aws_route53_record" "ns" {
allow_overwrite = true
zone_id = "${aws_route53_zone.hosted_zone.zone_id}"
name = "${aws_route53_zone.hosted_zone.name}"
type = "NS"
ttl = "30"
records = [
"${aws_route53_zone.hosted_zone.name_servers.0}",
"${aws_route53_zone.hosted_zone.name_servers.1}",
"${aws_route53_zone.hosted_zone.name_servers.2}",
"${aws_route53_zone.hosted_zone.name_servers.3}",
]
}
The resource aws_route53_zone implicitly creates a nameserver.
Prior to version 2.0.0 of Terraform AWS Provider, the resource would automatically perform an UPSERT operation on Route 53 when creating a Terraform aws_route53_record resource instead of a CREATE operation.
See https://github.com/terraform-providers/terraform-provider-aws/issues/8778
The resource aws_route53_record requires an
allow_overwrite = true.
The resource aws_route53_zone implicitly creates a nameserver.
Prior to version 2.0.0 of Terraform AWS Provider, the resource would automatically perform an UPSERT operation on Route 53 when creating a Terraform aws_route53_record resource instead of a CREATE operation.