Fix terraform fmt formatting

This commit is contained in:
Dalton Hubble
2019-11-13 23:44:02 -08:00
parent 19ee57dc04
commit 8a9e8595ae
24 changed files with 149 additions and 149 deletions

View File

@ -1,7 +1,7 @@
locals {
# coreos-stable -> coreos flavor, stable channel
# flatcar-stable -> flatcar flavor, stable channel
flavor = split("-", var.os_channel)[0]
flavor = split("-", var.os_channel)[0]
channel = split("-", var.os_channel)[1]
}
@ -34,12 +34,12 @@ data "template_file" "container-linux-install-configs" {
template = file("${path.module}/cl/install.yaml.tmpl")
vars = {
os_flavor = local.flavor
os_channel = local.channel
os_version = var.os_version
ignition_endpoint = format("%s/ignition", var.matchbox_http_endpoint)
install_disk = var.install_disk
ssh_authorized_key = var.ssh_authorized_key
os_flavor = local.flavor
os_channel = local.channel
os_version = var.os_version
ignition_endpoint = format("%s/ignition", var.matchbox_http_endpoint)
install_disk = var.install_disk
ssh_authorized_key = var.ssh_authorized_key
# only cached-container-linux profile adds -b baseurl
baseurl_flag = ""
}
@ -75,12 +75,12 @@ data "template_file" "cached-container-linux-install-configs" {
template = file("${path.module}/cl/install.yaml.tmpl")
vars = {
os_flavor = local.flavor
os_channel = local.channel
os_version = var.os_version
ignition_endpoint = format("%s/ignition", var.matchbox_http_endpoint)
install_disk = var.install_disk
ssh_authorized_key = var.ssh_authorized_key
os_flavor = local.flavor
os_channel = local.channel
os_version = var.os_version
ignition_endpoint = format("%s/ignition", var.matchbox_http_endpoint)
install_disk = var.install_disk
ssh_authorized_key = var.ssh_authorized_key
# profile uses -b baseurl to install from matchbox cache
baseurl_flag = "-b ${var.matchbox_http_endpoint}/assets/${local.flavor}"
}
@ -156,7 +156,7 @@ data "template_file" "controller-configs" {
domain_name = var.controllers.*.domain[count.index]
etcd_name = var.controllers.*.name[count.index]
etcd_initial_cluster = join(",", formatlist("%s=https://%s:2380", var.controllers.*.name, var.controllers.*.domain))
cgroup_driver = var.os_channel == "flatcar-edge" ? "systemd" : "cgroupfs"
cgroup_driver = var.os_channel == "flatcar-edge" ? "systemd" : "cgroupfs"
cluster_dns_service_ip = module.bootstrap.cluster_dns_service_ip
cluster_domain_suffix = var.cluster_domain_suffix
ssh_authorized_key = var.ssh_authorized_key
@ -184,7 +184,7 @@ data "template_file" "worker-configs" {
vars = {
domain_name = var.workers.*.domain[count.index]
cgroup_driver = var.os_channel == "flatcar-edge" ? "systemd" : "cgroupfs"
cgroup_driver = var.os_channel == "flatcar-edge" ? "systemd" : "cgroupfs"
cluster_dns_service_ip = module.bootstrap.cluster_dns_service_ip
cluster_domain_suffix = var.cluster_domain_suffix
ssh_authorized_key = var.ssh_authorized_key

View File

@ -57,7 +57,7 @@ resource "null_resource" "copy-controller-secrets" {
content = module.bootstrap.etcd_peer_key
destination = "$HOME/etcd-peer.key"
}
provisioner "file" {
source = var.asset_dir
destination = "$HOME/assets"

View File

@ -24,8 +24,8 @@ variable "os_version" {
variable "controllers" {
type = list(object({
name = string
mac = string
name = string
mac = string
domain = string
}))
description = <<EOD
@ -36,8 +36,8 @@ EOD
variable "workers" {
type = list(object({
name = string
mac = string
name = string
mac = string
domain = string
}))
description = <<EOD
@ -97,57 +97,57 @@ variable "pod_cidr" {
}
variable "service_cidr" {
type = string
type = string
description = <<EOD
CIDR IPv4 range to assign Kubernetes services.
The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for coredns.
EOD
default = "10.3.0.0/16"
default = "10.3.0.0/16"
}
# optional
variable "download_protocol" {
type = string
type = string
description = "Protocol iPXE should use to download the kernel and initrd. Defaults to https, which requires iPXE compiled with crypto support. Unused if cached_install is true."
default = "https"
default = "https"
}
variable "cached_install" {
type = bool
type = bool
description = "Whether Container Linux should PXE boot and install from matchbox /assets cache. Note that the admin must have downloaded the os_version into matchbox assets."
default = false
default = false
}
variable "install_disk" {
type = string
default = "/dev/sda"
type = string
default = "/dev/sda"
description = "Disk device to which the install profiles should install Container Linux (e.g. /dev/sda)"
}
variable "kernel_args" {
type = list(string)
type = list(string)
description = "Additional kernel arguments to provide at PXE boot."
default = []
default = []
}
variable "enable_reporting" {
type = bool
type = bool
description = "Enable usage or analytics reporting to upstreams (Calico)"
default = false
default = false
}
variable "enable_aggregation" {
type = bool
type = bool
description = "Enable the Kubernetes Aggregation Layer (defaults to false)"
default = false
default = false
}
# unofficial, undocumented, unsupported
variable "cluster_domain_suffix" {
type = string
type = string
description = "Queries for domains with the suffix will be answered by coredns. Default is cluster.local (e.g. foo.default.svc.cluster.local) "
default = "cluster.local"
default = "cluster.local"
}