Fix the terraform fmt of configs
This commit is contained in:
parent
734bc1d32a
commit
43dc44623f
|
@ -1,5 +1,4 @@
|
|||
output "ingress_dns_name" {
|
||||
value = "${aws_elb.ingress.dns_name}"
|
||||
value = "${aws_elb.ingress.dns_name}"
|
||||
description = "DNS name of the ELB for distributing traffic to Ingress controllers"
|
||||
}
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
module "bootkube" {
|
||||
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=v0.7.0"
|
||||
|
||||
cluster_name = "${var.cluster_name}"
|
||||
api_servers = ["${var.k8s_domain_name}"]
|
||||
etcd_servers = ["${var.controller_domains}"]
|
||||
asset_dir = "${var.asset_dir}"
|
||||
networking = "${var.networking}"
|
||||
network_mtu = "${var.network_mtu}"
|
||||
pod_cidr = "${var.pod_cidr}"
|
||||
service_cidr = "${var.service_cidr}"
|
||||
cluster_name = "${var.cluster_name}"
|
||||
api_servers = ["${var.k8s_domain_name}"]
|
||||
etcd_servers = ["${var.controller_domains}"]
|
||||
asset_dir = "${var.asset_dir}"
|
||||
networking = "${var.networking}"
|
||||
network_mtu = "${var.network_mtu}"
|
||||
pod_cidr = "${var.pod_cidr}"
|
||||
service_cidr = "${var.service_cidr}"
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ data "template_file" "controller-configs" {
|
|||
etcd_initial_cluster = "${join(",", formatlist("%s=https://%s:2380", var.controller_names, var.controller_domains))}"
|
||||
k8s_dns_service_ip = "${module.bootkube.kube_dns_service_ip}"
|
||||
ssh_authorized_key = "${var.ssh_authorized_key}"
|
||||
networkd_content = "${element(var.controller_networkds, count.index)}"
|
||||
networkd_content = "${element(var.controller_networkds, count.index)}"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,6 +107,6 @@ data "template_file" "worker-configs" {
|
|||
domain_name = "${element(var.worker_domains, count.index)}"
|
||||
k8s_dns_service_ip = "${module.bootkube.kube_dns_service_ip}"
|
||||
ssh_authorized_key = "${var.ssh_authorized_key}"
|
||||
networkd_content = "${element(var.worker_networkds, count.index)}"
|
||||
networkd_content = "${element(var.worker_networkds, count.index)}"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,6 @@ resource "null_resource" "copy-kubeconfig" {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
# Secure copy bootkube assets to ONE controller and start bootkube to perform
|
||||
# one-time self-hosted cluster bootstrapping.
|
||||
resource "null_resource" "bootkube-start" {
|
||||
|
|
|
@ -119,14 +119,13 @@ variable "kernel_args" {
|
|||
# unofficial, undocumented, unsupported, temporary
|
||||
|
||||
variable "controller_networkds" {
|
||||
type = "list"
|
||||
type = "list"
|
||||
description = "Controller Container Linux config networkd section"
|
||||
default = []
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "worker_networkds" {
|
||||
type = "list"
|
||||
type = "list"
|
||||
description = "Worker Container Linux config networkd section"
|
||||
default = []
|
||||
default = []
|
||||
}
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ variable "kube_dns_service_ip" {
|
|||
variable "kernel_args" {
|
||||
description = "Additional kernel arguments to provide at PXE boot."
|
||||
type = "list"
|
||||
|
||||
default = [
|
||||
"root=/dev/sda1",
|
||||
]
|
||||
|
|
|
@ -64,8 +64,9 @@ data "template_file" "controller_config" {
|
|||
|
||||
vars = {
|
||||
# Cannot use cyclic dependencies on controllers or their DNS records
|
||||
etcd_name = "etcd${count.index}"
|
||||
etcd_domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}"
|
||||
etcd_name = "etcd${count.index}"
|
||||
etcd_domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}"
|
||||
|
||||
# etcd0=https://cluster-etcd0.example.com,etcd1=https://cluster-etcd1.example.com,...
|
||||
etcd_initial_cluster = "${join(",", formatlist("%s=https://%s:2380", null_resource.repeat.*.triggers.name, null_resource.repeat.*.triggers.domain))}"
|
||||
k8s_dns_service_ip = "${cidrhost(var.service_cidr, 10)}"
|
||||
|
|
|
@ -55,6 +55,7 @@ resource "google_compute_instance_template" "controller" {
|
|||
boot = true
|
||||
source_image = "${var.os_image}"
|
||||
disk_size_gb = "${var.disk_size}"
|
||||
|
||||
// Set explicit name to match the new default name set by the API.
|
||||
// https://github.com/terraform-providers/terraform-provider-google/issues/574
|
||||
device_name = "persistent-disk-0"
|
||||
|
|
|
@ -55,6 +55,7 @@ resource "google_compute_instance_template" "worker" {
|
|||
boot = true
|
||||
source_image = "${var.os_image}"
|
||||
disk_size_gb = "${var.disk_size}"
|
||||
|
||||
// Set explicit name to match the new default name set by the API.
|
||||
// https://github.com/terraform-providers/terraform-provider-google/issues/574
|
||||
device_name = "persistent-disk-0"
|
||||
|
|
Loading…
Reference in New Issue