Skip to content

Commit

Permalink
Fix terraform fmt formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dghubble committed Nov 14, 2019
1 parent 7b03677 commit d3862f3
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 55 deletions.
30 changes: 15 additions & 15 deletions container-linux/kubernetes/profiles.tf
Original file line number Diff line number Diff line change
@@ -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]
}

Expand Down Expand Up @@ -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 = ""
}
Expand Down Expand Up @@ -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}"
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion container-linux/kubernetes/ssh.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
40 changes: 20 additions & 20 deletions container-linux/kubernetes/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ variable "os_version" {

variable "controllers" {
type = list(object({
name = string
mac = string
name = string
mac = string
domain = string
}))
description = <<EOD
Expand All @@ -36,8 +36,8 @@ EOD

variable "workers" {
type = list(object({
name = string
mac = string
name = string
mac = string
domain = string
}))
description = <<EOD
Expand Down Expand Up @@ -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"
}

2 changes: 1 addition & 1 deletion fedora-coreos/kubernetes/ssh.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,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"
Expand Down
36 changes: 18 additions & 18 deletions fedora-coreos/kubernetes/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ variable "os_version" {

variable "controllers" {
type = list(object({
name = string
mac = string
name = string
mac = string
domain = string
}))
description = <<EOD
Expand All @@ -37,8 +37,8 @@ EOD

variable "workers" {
type = list(object({
name = string
mac = string
name = string
mac = string
domain = string
}))
description = <<EOD
Expand Down Expand Up @@ -98,51 +98,51 @@ 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 "cached_install" {
type = bool
type = bool
description = "Whether Fedora CoreOS 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
type = string
description = "Disk device to install Fedora CoreOS (e.g. sda)"
default = "sda"
default = "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" {
description = "Queries for domains with the suffix will be answered by coredns. Default is cluster.local (e.g. foo.default.svc.cluster.local) "
type = string
default = "cluster.local"
type = string
default = "cluster.local"
}

0 comments on commit d3862f3

Please sign in to comment.