Skip to content

Commit

Permalink
Fix terraform format with fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dghubble committed Dec 5, 2019
1 parent 50a221e commit dce4911
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 29 deletions.
6 changes: 3 additions & 3 deletions conditional.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ locals {
# flannel manifests map
# { manifests-networking/manifest.yaml => content }
flannel_manifests = {
for name in fileset("${path.module}/resources/flannel", "*.yaml"):
for name in fileset("${path.module}/resources/flannel", "*.yaml") :
"manifests-networking/${name}" => templatefile(
"${path.module}/resources/flannel/${name}",
{
Expand All @@ -19,7 +19,7 @@ locals {
# calico manifests map
# { manifests-networking/manifest.yaml => content }
calico_manifests = {
for name in fileset("${path.module}/resources/calico", "*.yaml"):
for name in fileset("${path.module}/resources/calico", "*.yaml") :
"manifests-networking/${name}" => templatefile(
"${path.module}/resources/calico/${name}",
{
Expand All @@ -41,7 +41,7 @@ locals {
# kube-router manifests map
# { manifests-networking/manifest.yaml => content }
kube_router_manifests = {
for name in fileset("${path.module}/resources/kube-router", "*.yaml"):
for name in fileset("${path.module}/resources/kube-router", "*.yaml") :
"manifests-networking/${name}" => templatefile(
"${path.module}/resources/kube-router/${name}",
{
Expand Down
4 changes: 2 additions & 2 deletions manifests.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ locals {
# Kubernetes static pod manifests map
# {static-manifests/manifest.yaml => content }
static_manifests = {
for name in fileset("${path.module}/resources/static-manifests", "*.yaml"):
for name in fileset("${path.module}/resources/static-manifests", "*.yaml") :
"static-manifests/${name}" => templatefile(
"${path.module}/resources/static-manifests/${name}",
{
Expand All @@ -20,7 +20,7 @@ locals {
# Kubernetes control plane manifests map
# { manifests/manifest.yaml => content }
manifests = {
for name in fileset("${path.module}/resources/manifests", "**/*.yaml"):
for name in fileset("${path.module}/resources/manifests", "**/*.yaml") :
"manifests/${name}" => templatefile(
"${path.module}/resources/manifests/${name}",
{
Expand Down
18 changes: 9 additions & 9 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ output "cluster_dns_service_ip" {

// Generated kubeconfig for Kubelets (i.e. lower privilege than admin)
output "kubeconfig-kubelet" {
value = data.template_file.kubeconfig-kubelet.rendered
value = data.template_file.kubeconfig-kubelet.rendered
sensitive = true
}

// Generated kubeconfig for admins (i.e. human super-user)
output "kubeconfig-admin" {
value = data.template_file.kubeconfig-admin.rendered
value = data.template_file.kubeconfig-admin.rendered
sensitive = true
}

Expand All @@ -36,36 +36,36 @@ output "assets_dist" {
# etcd TLS assets

output "etcd_ca_cert" {
value = tls_self_signed_cert.etcd-ca.cert_pem
value = tls_self_signed_cert.etcd-ca.cert_pem
sensitive = true
}

output "etcd_client_cert" {
value = tls_locally_signed_cert.client.cert_pem
value = tls_locally_signed_cert.client.cert_pem
sensitive = true
}

output "etcd_client_key" {
value = tls_private_key.client.private_key_pem
value = tls_private_key.client.private_key_pem
sensitive = true
}

output "etcd_server_cert" {
value = tls_locally_signed_cert.server.cert_pem
value = tls_locally_signed_cert.server.cert_pem
sensitive = true
}

output "etcd_server_key" {
value = tls_private_key.server.private_key_pem
value = tls_private_key.server.private_key_pem
sensitive = true
}

output "etcd_peer_cert" {
value = tls_locally_signed_cert.peer.cert_pem
value = tls_locally_signed_cert.peer.cert_pem
sensitive = true
}

output "etcd_peer_key" {
value = tls_private_key.peer.private_key_pem
value = tls_private_key.peer.private_key_pem
sensitive = true
}
2 changes: 1 addition & 1 deletion tls-aggregation.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
locals {
# Kubernetes Aggregation TLS assets map
aggregation_tls = var.enable_aggregation ? {
"tls/k8s/aggregation-ca.crt" = tls_self_signed_cert.aggregation-ca[0].cert_pem,
"tls/k8s/aggregation-ca.crt" = tls_self_signed_cert.aggregation-ca[0].cert_pem,
"tls/k8s/aggregation-client.crt" = tls_locally_signed_cert.aggregation-client[0].cert_pem,
"tls/k8s/aggregation-client.key" = tls_private_key.aggregation-client[0].private_key_pem,
} : {}
Expand Down
16 changes: 8 additions & 8 deletions tls-etcd.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ locals {
# etcd TLS assets map
etcd_tls = {
"tls/etcd/etcd-client-ca.crt" = tls_self_signed_cert.etcd-ca.cert_pem,
"tls/etcd/etcd-client.crt" = tls_locally_signed_cert.client.cert_pem,
"tls/etcd/etcd-client.key" = tls_private_key.client.private_key_pem
"tls/etcd/server-ca.crt" = tls_self_signed_cert.etcd-ca.cert_pem,
"tls/etcd/server.crt" = tls_locally_signed_cert.server.cert_pem
"tls/etcd/server.key" = tls_private_key.server.private_key_pem
"tls/etcd/peer-ca.crt" = tls_self_signed_cert.etcd-ca.cert_pem,
"tls/etcd/peer.crt" = tls_locally_signed_cert.peer.cert_pem
"tls/etcd/peer.key" = tls_private_key.peer.private_key_pem
"tls/etcd/etcd-client.crt" = tls_locally_signed_cert.client.cert_pem,
"tls/etcd/etcd-client.key" = tls_private_key.client.private_key_pem
"tls/etcd/server-ca.crt" = tls_self_signed_cert.etcd-ca.cert_pem,
"tls/etcd/server.crt" = tls_locally_signed_cert.server.cert_pem
"tls/etcd/server.key" = tls_private_key.server.private_key_pem
"tls/etcd/peer-ca.crt" = tls_self_signed_cert.etcd-ca.cert_pem,
"tls/etcd/peer.crt" = tls_locally_signed_cert.peer.cert_pem
"tls/etcd/peer.key" = tls_private_key.peer.private_key_pem
}
}

Expand Down
8 changes: 4 additions & 4 deletions tls-k8s.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
locals {
# Kubernetes TLS assets map
kubernetes_tls = {
"tls/k8s/ca.crt" = tls_self_signed_cert.kube-ca.cert_pem,
"tls/k8s/ca.key" = tls_private_key.kube-ca.private_key_pem,
"tls/k8s/apiserver.crt" = tls_locally_signed_cert.apiserver.cert_pem,
"tls/k8s/apiserver.key" = tls_private_key.apiserver.private_key_pem,
"tls/k8s/ca.crt" = tls_self_signed_cert.kube-ca.cert_pem,
"tls/k8s/ca.key" = tls_private_key.kube-ca.private_key_pem,
"tls/k8s/apiserver.crt" = tls_locally_signed_cert.apiserver.cert_pem,
"tls/k8s/apiserver.key" = tls_private_key.apiserver.private_key_pem,
"tls/k8s/service-account.pub" = tls_private_key.service-account.public_key_pem
"tls/k8s/service-account.key" = tls_private_key.service-account.private_key_pem
}
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ variable "pod_cidr" {
}

variable "service_cidr" {
type = string
type = string
description = <<EOD
CIDR IP range to assign Kubernetes services.
The 1st IP will be reserved for kube_apiserver, the 10th IP will be reserved for kube-dns.
EOD
default = "10.3.0.0/24"
default = "10.3.0.0/24"
}


Expand Down

0 comments on commit dce4911

Please sign in to comment.