1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +01:00
Files
installer/openstack/dns.tf
Sergiusz Urbaniak 48922dc6e3 network: move etcd and worker nodes to a private subnet
Currently all nodes are exposed on the default public network.

This fixes it by only exposing the master nodes on the public network
and restricts etcd and worker nodes on a private subnet.
2017-02-22 16:57:11 +01:00

29 lines
907 B
HCL

data "aws_route53_zone" "tectonic" {
name = "${var.base_domain}"
}
resource "aws_route53_record" "tectonic-api" {
zone_id = "${data.aws_route53_zone.tectonic.zone_id}"
name = "${var.cluster_name}-k8s"
type = "A"
ttl = "60"
records = ["${openstack_compute_instance_v2.control_node.*.access_ip_v4}"]
}
resource "aws_route53_record" "tectonic-console" {
zone_id = "${data.aws_route53_zone.tectonic.zone_id}"
name = "${var.cluster_name}"
type = "A"
ttl = "60"
records = ["${openstack_compute_instance_v2.worker_node.*.access_ip_v4}"]
}
resource "aws_route53_record" "controller_nodes" {
count = "${var.controller_count}"
zone_id = "${data.aws_route53_zone.tectonic.zone_id}"
name = "${var.cluster_name}-controller-${count.index}"
type = "A"
ttl = "60"
records = ["${openstack_compute_instance_v2.control_node.*.access_ip_v4[count.index]}"]
}