-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.tf
43 lines (37 loc) · 1.45 KB
/
template.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
resource "template_file" "etcd-user-data" {
template = "${file("data/etcd-userdata.yml")}"
vars = {
etcd_discovery_url = "${replace(file("etcd_discovery_url.txt"), "/\n/", "")}"
}
}
resource "template_file" "master-user-data" {
template = "${file("data/master-userdata.yml")}"
vars {
KUBERNETES_VERSION = "${var.kubernetes_version}"
KUBERNETES_CONTAINERS_CIDR = "${var.pod_network}"
FLANNELD_ETCD_ENDPOINTS = "http://${aws_route53_record.etcd.name}:2379"
ETCD_ENDPOINTS = "http://${aws_route53_record.etcd.name}:2379"
SERVICE_IP_RANGE = "${var.service_ip_range}"
API_SECURE_PORT = "${var.api_secure_port}"
DNS_SERVICE_IP = "${var.dns_service_ip}"
S3_BUCKET = "${var.s3_bucket}"
K8S_VER = "${var.kubelet_version}"
aws_region = "${var.aws_region}"
}
}
resource "template_file" "worker-user-data" {
template = "${file("data/worker-userdata.yml")}"
vars {
KUBERNETES_VERSION = "${var.kubernetes_version}"
KUBERNETES_CONTAINERS_CIDR = "${var.pod_network}"
FLANNELD_ETCD_ENDPOINTS = "http://${aws_route53_record.etcd.name}:2379"
ETCD_ENDPOINTS = "http://${aws_route53_record.etcd.name}:2379"
SERVICE_IP_RANGE = "${var.service_ip_range}"
API_SECURE_PORT = "${var.api_secure_port}"
DNS_SERVICE_IP = "${var.dns_service_ip}"
MASTER_ELB = "${aws_route53_record.master.name}"
S3_BUCKET = "${var.s3_bucket}"
K8S_VER = "${var.kubelet_version}"
aws_region = "${var.aws_region}"
}
}