From 83f84c76e63c37104c48a443476e63be18748a67 Mon Sep 17 00:00:00 2001 From: Simon Lauger <simon@lauger.de> Date: Sat, 27 Feb 2021 23:28:50 +0100 Subject: [PATCH] chore: run terraform fmt --- terraform/main.tf | 76 +++++++++---------- terraform/modules/hcloud_coreos/variables.tf | 2 +- terraform/modules/hcloud_instance/main.tf | 4 +- .../modules/hcloud_instance/variables.tf | 2 +- terraform/versions.tf | 10 +-- 5 files changed, 47 insertions(+), 47 deletions(-) diff --git a/terraform/main.tf b/terraform/main.tf index 70de4cc..0ca1045 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -13,48 +13,48 @@ module "ignition" { } module "bootstrap" { - source = "./modules/hcloud_coreos" - instance_count = var.bootstrap == true ? 1 : 0 - location = var.location - name = "bootstrap" - dns_domain = var.dns_domain - dns_zone_id = var.dns_zone_id - dns_internal_ip = false - image = data.hcloud_image.image.id - image_name = var.image - server_type = "cx41" - subnet = hcloud_network_subnet.subnet.id - ignition_url = var.bootstrap == true ? "http://${cloudflare_record.dns_a_ignition[0].name}/bootstrap.ign" : "" + source = "./modules/hcloud_coreos" + instance_count = var.bootstrap == true ? 1 : 0 + location = var.location + name = "bootstrap" + dns_domain = var.dns_domain + dns_zone_id = var.dns_zone_id + dns_internal_ip = false + image = data.hcloud_image.image.id + image_name = var.image + server_type = "cx41" + subnet = hcloud_network_subnet.subnet.id + ignition_url = var.bootstrap == true ? "http://${cloudflare_record.dns_a_ignition[0].name}/bootstrap.ign" : "" } module "master" { - source = "./modules/hcloud_coreos" - instance_count = var.replicas_master - location = var.location - name = "master" - dns_domain = var.dns_domain - dns_zone_id = var.dns_zone_id - dns_internal_ip = false - image = data.hcloud_image.image.id - image_name = var.image - server_type = "cx41" - subnet = hcloud_network_subnet.subnet.id - ignition_url = "https://api-int.${var.dns_domain}:22623/config/master" - ignition_cacert = local.ignition_master_cacert + source = "./modules/hcloud_coreos" + instance_count = var.replicas_master + location = var.location + name = "master" + dns_domain = var.dns_domain + dns_zone_id = var.dns_zone_id + dns_internal_ip = false + image = data.hcloud_image.image.id + image_name = var.image + server_type = "cx41" + subnet = hcloud_network_subnet.subnet.id + ignition_url = "https://api-int.${var.dns_domain}:22623/config/master" + ignition_cacert = local.ignition_master_cacert } module "worker" { - source = "./modules/hcloud_coreos" - instance_count = var.replicas_worker - location = var.location - name = "worker" - dns_domain = var.dns_domain - dns_zone_id = var.dns_zone_id - dns_internal_ip = false - image = data.hcloud_image.image.id - image_name = var.image - server_type = "cx41" - subnet = hcloud_network_subnet.subnet.id - ignition_url = "https://api-int.${var.dns_domain}:22623/config/worker" - ignition_cacert = local.ignition_worker_cacert + source = "./modules/hcloud_coreos" + instance_count = var.replicas_worker + location = var.location + name = "worker" + dns_domain = var.dns_domain + dns_zone_id = var.dns_zone_id + dns_internal_ip = false + image = data.hcloud_image.image.id + image_name = var.image + server_type = "cx41" + subnet = hcloud_network_subnet.subnet.id + ignition_url = "https://api-int.${var.dns_domain}:22623/config/worker" + ignition_cacert = local.ignition_worker_cacert } diff --git a/terraform/modules/hcloud_coreos/variables.tf b/terraform/modules/hcloud_coreos/variables.tf index ff5497b..43e060b 100644 --- a/terraform/modules/hcloud_coreos/variables.tf +++ b/terraform/modules/hcloud_coreos/variables.tf @@ -42,7 +42,7 @@ variable "user_data" { } variable "ssh_keys" { - type = list + type = list(any) description = "SSH key IDs or names which should be injected into the server at creation time" default = [] } diff --git a/terraform/modules/hcloud_instance/main.tf b/terraform/modules/hcloud_instance/main.tf index b2e2ea2..f315787 100644 --- a/terraform/modules/hcloud_instance/main.tf +++ b/terraform/modules/hcloud_instance/main.tf @@ -19,7 +19,7 @@ resource "cloudflare_record" "dns-a" { name = element(hcloud_server.server.*.name, count.index) value = element(hcloud_server.server.*.ipv4_address, count.index) type = "A" - ttl = 1 + ttl = 120 } resource "cloudflare_record" "dns-aaaa" { @@ -28,7 +28,7 @@ resource "cloudflare_record" "dns-aaaa" { name = element(hcloud_server.server.*.name, count.index) value = "${element(hcloud_server.server.*.ipv6_address, count.index)}1" type = "AAAA" - ttl = 1 + ttl = 120 } resource "hcloud_rdns" "dns-ptr-ipv4" { diff --git a/terraform/modules/hcloud_instance/variables.tf b/terraform/modules/hcloud_instance/variables.tf index 5156633..bab2089 100644 --- a/terraform/modules/hcloud_instance/variables.tf +++ b/terraform/modules/hcloud_instance/variables.tf @@ -42,7 +42,7 @@ variable "user_data" { } variable "ssh_keys" { - type = list + type = list(any) description = "SSH key IDs or names which should be injected into the server at creation time" default = [] } diff --git a/terraform/versions.tf b/terraform/versions.tf index 3fc08e4..03d6037 100644 --- a/terraform/versions.tf +++ b/terraform/versions.tf @@ -1,23 +1,23 @@ terraform { required_providers { cloudflare = { - source = "cloudflare/cloudflare" + source = "cloudflare/cloudflare" version = "2.14.0" } hcloud = { - source = "hetznercloud/hcloud" + source = "hetznercloud/hcloud" version = "1.23.0" } template = { - source = "hashicorp/template" + source = "hashicorp/template" version = "2.2.0" } local = { - source = "hashicorp/local" + source = "hashicorp/local" version = "1.4.0" } random = { - source = "hashicorp/random" + source = "hashicorp/random" version = "2.3.1" } } -- GitLab