Skip to content

Commit

Permalink
[breaking][aws] Upgrade Route53 <-> VPC binding
Browse files Browse the repository at this point in the history
The old way has been deprecated, let's now use the
aws_route_53_zone_association resource.
  • Loading branch information
elafarge committed Feb 1, 2019
1 parent 41f7860 commit c37abdd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion aws/cluster/route53.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

resource "aws_route53_zone" "cluster" {
name = "${var.cluster-name}"
vpc_id = "${var.master-lb-visibility == "Private" ? aws_vpc.main.id : ""}"
force_destroy = true
}

resource "aws_route53_zone_association" "kubernetes-vpc" {
vpc_id = "${aws_vpc.main.id}"
zone_id = "${aws_route53_zone.cluster.id}"
}

resource "aws_route53_record" "cluster-root" {
count = "${var.master-lb-visibility == "Private" ? 0 : 1}"

Expand Down

0 comments on commit c37abdd

Please sign in to comment.