Fix terraform formatting
This commit is contained in:
parent
fb6f40051f
commit
0227014fa0
|
@ -68,9 +68,9 @@ data "template_file" "etcds" {
|
||||||
template = "etcd$${index}=https://$${cluster_name}-etcd$${index}.$${dns_zone}:2380"
|
template = "etcd$${index}=https://$${cluster_name}-etcd$${index}.$${dns_zone}:2380"
|
||||||
|
|
||||||
vars {
|
vars {
|
||||||
index = "${count.index}"
|
index = "${count.index}"
|
||||||
cluster_name = "${var.cluster_name}"
|
cluster_name = "${var.cluster_name}"
|
||||||
dns_zone = "${var.dns_zone}"
|
dns_zone = "${var.dns_zone}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@ output "ingress_dns_name" {
|
||||||
|
|
||||||
output "target_group_http_arn" {
|
output "target_group_http_arn" {
|
||||||
description = "ARN of a target group of workers for HTTP traffic"
|
description = "ARN of a target group of workers for HTTP traffic"
|
||||||
value = "${module.workers.target_group_http_arn}"
|
value = "${module.workers.target_group_http_arn}"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "target_group_https_arn" {
|
output "target_group_https_arn" {
|
||||||
description = "ARN of a target group of workers for HTTPS traffic"
|
description = "ARN of a target group of workers for HTTPS traffic"
|
||||||
value = "${module.workers.target_group_https_arn}"
|
value = "${module.workers.target_group_https_arn}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Outputs for worker pools
|
# Outputs for worker pools
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
output "target_group_http_arn" {
|
output "target_group_http_arn" {
|
||||||
description = "ARN of a target group of workers for HTTP traffic"
|
description = "ARN of a target group of workers for HTTP traffic"
|
||||||
value = "${aws_lb_target_group.workers-http.arn}"
|
value = "${aws_lb_target_group.workers-http.arn}"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "target_group_https_arn" {
|
output "target_group_https_arn" {
|
||||||
description = "ARN of a target group of workers for HTTPS traffic"
|
description = "ARN of a target group of workers for HTTPS traffic"
|
||||||
value = "${aws_lb_target_group.workers-https.arn}"
|
value = "${aws_lb_target_group.workers-https.arn}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,8 +68,8 @@ data "template_file" "etcds" {
|
||||||
template = "etcd$${index}=https://$${cluster_name}-etcd$${index}.$${dns_zone}:2380"
|
template = "etcd$${index}=https://$${cluster_name}-etcd$${index}.$${dns_zone}:2380"
|
||||||
|
|
||||||
vars {
|
vars {
|
||||||
index = "${count.index}"
|
index = "${count.index}"
|
||||||
cluster_name = "${var.cluster_name}"
|
cluster_name = "${var.cluster_name}"
|
||||||
dns_zone = "${var.dns_zone}"
|
dns_zone = "${var.dns_zone}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@ output "ingress_dns_name" {
|
||||||
|
|
||||||
output "target_group_http_arn" {
|
output "target_group_http_arn" {
|
||||||
description = "ARN of a target group of workers for HTTP traffic"
|
description = "ARN of a target group of workers for HTTP traffic"
|
||||||
value = "${module.workers.target_group_http_arn}"
|
value = "${module.workers.target_group_http_arn}"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "target_group_https_arn" {
|
output "target_group_https_arn" {
|
||||||
description = "ARN of a target group of workers for HTTPS traffic"
|
description = "ARN of a target group of workers for HTTPS traffic"
|
||||||
value = "${module.workers.target_group_https_arn}"
|
value = "${module.workers.target_group_https_arn}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Outputs for worker pools
|
# Outputs for worker pools
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
output "target_group_http_arn" {
|
output "target_group_http_arn" {
|
||||||
description = "ARN of a target group of workers for HTTP traffic"
|
description = "ARN of a target group of workers for HTTP traffic"
|
||||||
value = "${aws_lb_target_group.workers-http.arn}"
|
value = "${aws_lb_target_group.workers-http.arn}"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "target_group_https_arn" {
|
output "target_group_https_arn" {
|
||||||
description = "ARN of a target group of workers for HTTPS traffic"
|
description = "ARN of a target group of workers for HTTPS traffic"
|
||||||
value = "${aws_lb_target_group.workers-https.arn}"
|
value = "${aws_lb_target_group.workers-https.arn}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
resource "matchbox_group" "install" {
|
resource "matchbox_group" "install" {
|
||||||
count = "${length(var.controller_names) + length(var.worker_names)}"
|
count = "${length(var.controller_names) + length(var.worker_names)}"
|
||||||
|
|
||||||
name = "${format("install-%s", element(concat(var.controller_names, var.worker_names), count.index))}"
|
name = "${format("install-%s", element(concat(var.controller_names, var.worker_names), count.index))}"
|
||||||
|
|
||||||
profile = "${local.flavor == "flatcar" ? element(matchbox_profile.flatcar-install.*.name, count.index) : var.cached_install == "true" ? element(matchbox_profile.cached-container-linux-install.*.name, count.index) : element(matchbox_profile.container-linux-install.*.name, count.index)}"
|
profile = "${local.flavor == "flatcar" ? element(matchbox_profile.flatcar-install.*.name, count.index) : var.cached_install == "true" ? element(matchbox_profile.cached-container-linux-install.*.name, count.index) : element(matchbox_profile.container-linux-install.*.name, count.index)}"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
locals {
|
locals {
|
||||||
# coreos-stable -> coreos flavor, stable channel
|
# coreos-stable -> coreos flavor, stable channel
|
||||||
# flatcar-stable -> flatcar flavor, stable channel
|
# flatcar-stable -> flatcar flavor, stable channel
|
||||||
flavor = "${element(split("-", var.os_channel), 0)}"
|
flavor = "${element(split("-", var.os_channel), 0)}"
|
||||||
channel = "${element(split("-", var.os_channel), 1)}"
|
|
||||||
|
channel = "${element(split("-", var.os_channel), 1)}"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Container Linux Install profile (from release.core-os.net)
|
// Container Linux Install profile (from release.core-os.net)
|
||||||
|
|
|
@ -69,7 +69,7 @@ data "template_file" "controller_config" {
|
||||||
etcd_domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}"
|
etcd_domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}"
|
||||||
|
|
||||||
# etcd0=https://cluster-etcd0.example.com,etcd1=https://cluster-etcd1.example.com,...
|
# etcd0=https://cluster-etcd0.example.com,etcd1=https://cluster-etcd1.example.com,...
|
||||||
etcd_initial_cluster = "${join(",", data.template_file.etcds.*.rendered)}"
|
etcd_initial_cluster = "${join(",", data.template_file.etcds.*.rendered)}"
|
||||||
k8s_dns_service_ip = "${cidrhost(var.service_cidr, 10)}"
|
k8s_dns_service_ip = "${cidrhost(var.service_cidr, 10)}"
|
||||||
cluster_domain_suffix = "${var.cluster_domain_suffix}"
|
cluster_domain_suffix = "${var.cluster_domain_suffix}"
|
||||||
}
|
}
|
||||||
|
@ -80,9 +80,9 @@ data "template_file" "etcds" {
|
||||||
template = "etcd$${index}=https://$${cluster_name}-etcd$${index}.$${dns_zone}:2380"
|
template = "etcd$${index}=https://$${cluster_name}-etcd$${index}.$${dns_zone}:2380"
|
||||||
|
|
||||||
vars {
|
vars {
|
||||||
index = "${count.index}"
|
index = "${count.index}"
|
||||||
cluster_name = "${var.cluster_name}"
|
cluster_name = "${var.cluster_name}"
|
||||||
dns_zone = "${var.dns_zone}"
|
dns_zone = "${var.dns_zone}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,8 +82,8 @@ data "template_file" "etcds" {
|
||||||
template = "etcd$${index}=https://$${cluster_name}-etcd$${index}.$${dns_zone}:2380"
|
template = "etcd$${index}=https://$${cluster_name}-etcd$${index}.$${dns_zone}:2380"
|
||||||
|
|
||||||
vars {
|
vars {
|
||||||
index = "${count.index}"
|
index = "${count.index}"
|
||||||
cluster_name = "${var.cluster_name}"
|
cluster_name = "${var.cluster_name}"
|
||||||
dns_zone = "${var.dns_zone}"
|
dns_zone = "${var.dns_zone}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ module "bootkube" {
|
||||||
pod_cidr = "${var.pod_cidr}"
|
pod_cidr = "${var.pod_cidr}"
|
||||||
service_cidr = "${var.service_cidr}"
|
service_cidr = "${var.service_cidr}"
|
||||||
cluster_domain_suffix = "${var.cluster_domain_suffix}"
|
cluster_domain_suffix = "${var.cluster_domain_suffix}"
|
||||||
|
|
||||||
// temporary
|
// temporary
|
||||||
apiserver_port = 443
|
apiserver_port = 443
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ module "bootkube" {
|
||||||
|
|
||||||
# Fedora
|
# Fedora
|
||||||
trusted_certs_dir = "/etc/pki/tls/certs"
|
trusted_certs_dir = "/etc/pki/tls/certs"
|
||||||
|
|
||||||
// temporary
|
// temporary
|
||||||
apiserver_port = 443
|
apiserver_port = 443
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue