Fix the terraform fmt of configs
This commit is contained in:
parent
f04411377f
commit
e19517d3df
|
@ -45,9 +45,9 @@ resource "matchbox_group" "worker" {
|
|||
}
|
||||
|
||||
metadata {
|
||||
domain_name = "${element(var.worker_domains, count.index)}"
|
||||
etcd_on_host = "${var.experimental_self_hosted_etcd ? "false" : "true"}"
|
||||
k8s_dns_service_ip = "${module.bootkube.kube_dns_service_ip}"
|
||||
ssh_authorized_key = "${var.ssh_authorized_key}"
|
||||
domain_name = "${element(var.worker_domains, count.index)}"
|
||||
etcd_on_host = "${var.experimental_self_hosted_etcd ? "false" : "true"}"
|
||||
k8s_dns_service_ip = "${module.bootkube.kube_dns_service_ip}"
|
||||
ssh_authorized_key = "${var.ssh_authorized_key}"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,4 +78,3 @@ resource "matchbox_profile" "worker" {
|
|||
name = "worker"
|
||||
container_linux_config = "${file("${path.module}/cl/worker.yaml.tmpl")}"
|
||||
}
|
||||
|
||||
|
|
|
@ -15,37 +15,37 @@ resource "null_resource" "copy-secrets" {
|
|||
}
|
||||
|
||||
provisioner "file" {
|
||||
content = "${module.bootkube.etcd_ca_cert}"
|
||||
content = "${module.bootkube.etcd_ca_cert}"
|
||||
destination = "$HOME/etcd-client-ca.crt"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
content = "${module.bootkube.etcd_client_cert}"
|
||||
content = "${module.bootkube.etcd_client_cert}"
|
||||
destination = "$HOME/etcd-client.crt"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
content = "${module.bootkube.etcd_client_key}"
|
||||
content = "${module.bootkube.etcd_client_key}"
|
||||
destination = "$HOME/etcd-client.key"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
content = "${module.bootkube.etcd_server_cert}"
|
||||
content = "${module.bootkube.etcd_server_cert}"
|
||||
destination = "$HOME/etcd-server.crt"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
content = "${module.bootkube.etcd_server_key}"
|
||||
content = "${module.bootkube.etcd_server_key}"
|
||||
destination = "$HOME/etcd-server.key"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
content = "${module.bootkube.etcd_peer_cert}"
|
||||
content = "${module.bootkube.etcd_peer_cert}"
|
||||
destination = "$HOME/etcd-peer.crt"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
content = "${module.bootkube.etcd_peer_key}"
|
||||
content = "${module.bootkube.etcd_peer_key}"
|
||||
destination = "$HOME/etcd-peer.key"
|
||||
}
|
||||
|
||||
|
@ -94,4 +94,3 @@ resource "null_resource" "bootkube-start" {
|
|||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ resource "digitalocean_record" "controllers" {
|
|||
# DNS zone where record should be created
|
||||
domain = "${var.dns_zone}"
|
||||
|
||||
name = "${var.cluster_name}"
|
||||
type = "A"
|
||||
ttl = 300
|
||||
name = "${var.cluster_name}"
|
||||
type = "A"
|
||||
ttl = 300
|
||||
value = "${element(digitalocean_droplet.controllers.*.ipv4_address, count.index)}"
|
||||
}
|
||||
|
||||
|
@ -15,21 +15,21 @@ resource "digitalocean_record" "controllers" {
|
|||
resource "digitalocean_droplet" "controllers" {
|
||||
count = "${var.controller_count}"
|
||||
|
||||
name = "${var.cluster_name}-controller-${count.index}"
|
||||
name = "${var.cluster_name}-controller-${count.index}"
|
||||
region = "${var.region}"
|
||||
|
||||
image = "${var.image}"
|
||||
size = "${var.controller_type}"
|
||||
size = "${var.controller_type}"
|
||||
|
||||
# network
|
||||
ipv6 = true
|
||||
ipv6 = true
|
||||
private_networking = true
|
||||
|
||||
user_data = "${data.ct_config.controller_ign.rendered}"
|
||||
ssh_keys = "${var.ssh_fingerprints}"
|
||||
ssh_keys = "${var.ssh_fingerprints}"
|
||||
|
||||
tags = [
|
||||
"${digitalocean_tag.controllers.id}"
|
||||
"${digitalocean_tag.controllers.id}",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -6,28 +6,28 @@ resource "digitalocean_firewall" "rules" {
|
|||
# allow ssh, http/https ingress, and peer-to-peer traffic
|
||||
inbound_rule = [
|
||||
{
|
||||
protocol = "tcp"
|
||||
port_range = "22"
|
||||
protocol = "tcp"
|
||||
port_range = "22"
|
||||
source_addresses = ["0.0.0.0/0", "::/0"]
|
||||
},
|
||||
{
|
||||
protocol = "tcp"
|
||||
port_range = "80"
|
||||
protocol = "tcp"
|
||||
port_range = "80"
|
||||
source_addresses = ["0.0.0.0/0", "::/0"]
|
||||
},
|
||||
{
|
||||
protocol = "tcp"
|
||||
port_range = "443"
|
||||
protocol = "tcp"
|
||||
port_range = "443"
|
||||
source_addresses = ["0.0.0.0/0", "::/0"]
|
||||
},
|
||||
{
|
||||
protocol = "udp"
|
||||
port_range = "all"
|
||||
protocol = "udp"
|
||||
port_range = "all"
|
||||
source_tags = ["${var.cluster_name}-controller", "${var.cluster_name}-worker"]
|
||||
},
|
||||
{
|
||||
protocol = "tcp"
|
||||
port_range = "all"
|
||||
protocol = "tcp"
|
||||
port_range = "all"
|
||||
source_tags = ["${var.cluster_name}-controller", "${var.cluster_name}-worker"]
|
||||
},
|
||||
]
|
||||
|
@ -35,19 +35,18 @@ resource "digitalocean_firewall" "rules" {
|
|||
# allow all outbound traffic
|
||||
outbound_rule = [
|
||||
{
|
||||
protocol = "icmp"
|
||||
protocol = "icmp"
|
||||
destination_addresses = ["0.0.0.0/0", "::/0"]
|
||||
},
|
||||
{
|
||||
protocol = "udp"
|
||||
port_range = "all"
|
||||
protocol = "udp"
|
||||
port_range = "all"
|
||||
destination_addresses = ["0.0.0.0/0", "::/0"]
|
||||
},
|
||||
{
|
||||
protocol = "tcp"
|
||||
port_range = "all"
|
||||
protocol = "tcp"
|
||||
port_range = "all"
|
||||
destination_addresses = ["0.0.0.0/0", "::/0"]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -22,4 +22,3 @@ resource "null_resource" "bootkube-start" {
|
|||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ variable "region" {
|
|||
}
|
||||
|
||||
variable "dns_zone" {
|
||||
type = "string"
|
||||
type = "string"
|
||||
description = "Digital Ocean domain name (i.e. DNS zone with NS records) (e.g. digital-ocean.dghubble.io)"
|
||||
}
|
||||
|
||||
|
@ -19,8 +19,8 @@ variable "image" {
|
|||
}
|
||||
|
||||
variable "controller_type" {
|
||||
type = "string"
|
||||
default = "1gb"
|
||||
type = "string"
|
||||
default = "1gb"
|
||||
description = "Digital Ocean droplet type or size (e.g. 2gb, 4gb, 8gb). Do not choose a value below 2gb."
|
||||
}
|
||||
|
||||
|
@ -31,8 +31,8 @@ variable "controller_count" {
|
|||
}
|
||||
|
||||
variable "worker_type" {
|
||||
type = "string"
|
||||
default = "512mb"
|
||||
type = "string"
|
||||
default = "512mb"
|
||||
description = "Digital Ocean droplet type or size (e.g. 512mb, 1gb, 2gb, 4gb)"
|
||||
}
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ resource "digitalocean_record" "workers" {
|
|||
# DNS zone where record should be created
|
||||
domain = "${var.dns_zone}"
|
||||
|
||||
name = "${var.cluster_name}-workers"
|
||||
type = "A"
|
||||
ttl = 300
|
||||
name = "${var.cluster_name}-workers"
|
||||
type = "A"
|
||||
ttl = 300
|
||||
value = "${element(digitalocean_droplet.workers.*.ipv4_address, count.index)}"
|
||||
}
|
||||
|
||||
|
@ -15,21 +15,21 @@ resource "digitalocean_record" "workers" {
|
|||
resource "digitalocean_droplet" "workers" {
|
||||
count = "${var.worker_count}"
|
||||
|
||||
name = "${var.cluster_name}-worker-${count.index}"
|
||||
name = "${var.cluster_name}-worker-${count.index}"
|
||||
region = "${var.region}"
|
||||
|
||||
image = "${var.image}"
|
||||
size = "${var.worker_type}"
|
||||
size = "${var.worker_type}"
|
||||
|
||||
# network
|
||||
ipv6 = true
|
||||
ipv6 = true
|
||||
private_networking = true
|
||||
|
||||
user_data = "${data.ct_config.worker_ign.rendered}"
|
||||
ssh_keys = "${var.ssh_fingerprints}"
|
||||
ssh_keys = "${var.ssh_fingerprints}"
|
||||
|
||||
tags = [
|
||||
"${digitalocean_tag.workers.id}"
|
||||
"${digitalocean_tag.workers.id}",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue