Hi all,
I encountered an error with adding a record to route53. I create an elb with name redirecter-prod-redirecter-test, and I try to add it to route53 as an alias.
I changed the zoneID, but I have it the same way, fixed.
resource "aws_route53_record" "redirecter-test" {
zone_id = "Z1DV0ZFF4AVYLA"
type = "A"
alias {
zone_id = "${aws_elb.redirecter-prod-redirecter-test.zone_id}"
evaluate_target_health = true
}
}
The error I got:
===================
[....]
aws_route53_record.redirecter-test: Creating...
alias.#: "" => "1"
alias.620579030.evaluate_target_health: "" => "1"
alias.620579030.zone_id: "" => "Z3DZXE0Q79N41H"
fqdn: "" => "<computed>"
type: "" => "A"
zone_id: "" => "Z1DV0ZFF4AVYLA"
aws_route53_record.redirecter-test: Error: 1 error(s) occurred:
* InvalidChangeBatch: Tried to create an alias that targets
redirect-test.enbritely.co.uk., type A in zone Z3DZXE0Q79N41H, but the alias target name does not lie within the target zone
status code: 400, request id: [8dc74333-208a-11e5-9d2d-d5f90ef2f018]
Error applying plan:
1 error(s) occurred:
* InvalidChangeBatch: Tried to create an alias that targets
redirect-test.enbritely.co.uk., type A in zone Z3DZXE0Q79N41H, but the alias target name does not lie within the target zone
status code: 400, request id: [8dc74333-208a-11e5-9d2d-d5f90ef2f018]
===================
Terraform version: 0.6 (OS: Fedore 22)
I verified that I can do it on AWS console, I can add the recordset with the same parameters. The strange thing is that the error message seems off. In the part "type A in zone Z3DZXE0Q79N41H" the zoneid is the zoneid of the ELB not the hosted zone where I try to add the A record.
Any ideas what am I missing?
Thanks in advance,
Mate