From 9b50bce329eea8cfef31a021319ac56dad77775d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20B=C3=B6hm?= Date: Wed, 13 Dec 2023 17:40:00 +0100 Subject: [PATCH] Remove consul/dns module --- consul/dns/main.tf | 31 ------------------------------- consul/dns/variables.tf | 19 ------------------- consul/dns/versions.tf | 9 --------- 3 files changed, 59 deletions(-) delete mode 100644 consul/dns/main.tf delete mode 100644 consul/dns/variables.tf delete mode 100644 consul/dns/versions.tf diff --git a/consul/dns/main.tf b/consul/dns/main.tf deleted file mode 100644 index 423fd62..0000000 --- a/consul/dns/main.tf +++ /dev/null @@ -1,31 +0,0 @@ -resource "google_dns_record_set" "quorum" { - project = var.project - managed_zone = var.zone.name - name = "quorum.${var.zone.dns_name}" - type = "A" - ttl = 300 - rrdatas = var.targets -} - -resource "google_dns_managed_zone" "consul" { - project = var.project - name = "${var.name}-consul" - dns_name = "${var.name}.consul." - description = "${var.name}.consul" - visibility = "private" - - private_visibility_config { - networks { - network_url = var.network - } - } - - forwarding_config { - dynamic "target_name_servers" { - for_each = var.targets - content { - ipv4_address = target_name_servers.value - } - } - } -} diff --git a/consul/dns/variables.tf b/consul/dns/variables.tf deleted file mode 100644 index 042cbb5..0000000 --- a/consul/dns/variables.tf +++ /dev/null @@ -1,19 +0,0 @@ -variable "project" { - type = string -} - -variable "name" { - type = string -} - -variable "zone" { - type = any -} - -variable "network" { - type = string -} - -variable "targets" { - type = list(string) -} diff --git a/consul/dns/versions.tf b/consul/dns/versions.tf deleted file mode 100644 index fac5ab6..0000000 --- a/consul/dns/versions.tf +++ /dev/null @@ -1,9 +0,0 @@ -terraform { - required_providers { - # https://registry.terraform.io/providers/hashicorp/google/latest - google = { - source = "hashicorp/google" - version = "~> 5.4" - } - } -}