diff --git a/terraform/ovh.tf b/terraform/ovh.tf index 5033f4f..6bec40f 100644 --- a/terraform/ovh.tf +++ b/terraform/ovh.tf @@ -28,14 +28,14 @@ variable "subdomains_haumdaucher" { default = ["corona"] } -resource "ovh_domain_zone_record" "haumdaucher_subdomains" { - for_each = toset( var.subdomains_haumdaucher ) - zone = "haumdaucher.de" - subdomain = each.key - fieldtype = "CNAME" - ttl = local.ttl - target = "haumdaucher.de." -} +# resource "ovh_domain_zone_record" "haumdaucher_subdomains" { +# for_each = toset( var.subdomains_haumdaucher ) +# zone = "haumdaucher.de" +# subdomain = each.key +# fieldtype = "CNAME" +# ttl = local.ttl +# target = "haumdaucher.de." +# } # ## graf.me -> problems with domain variable "domains" { @@ -52,6 +52,14 @@ resource "ovh_domain_zone_record" "haumdaucher_domain" { target = "91.121.84.190" } +resource "ovh_domain_zone_record" "haumdaucher_wildcard_domain" { + zone = "haumdaucher.de" + subdomain = "*" + fieldtype = "A" + ttl = local.ttl + target = "91.121.84.190" +} + resource "ovh_domain_zone_record" "mail_moritzgraf" { zone = "moritzgraf.de" diff --git a/terraform/terraform.tfstate b/terraform/terraform.tfstate index e5e07d0..ad0ec72 100644 --- a/terraform/terraform.tfstate +++ b/terraform/terraform.tfstate @@ -1,7 +1,7 @@ { "version": 4, "terraform_version": "0.12.20", - "serial": 69, + "serial": 73, "lineage": "8aff5d23-05f6-10eb-0ae6-1084c787677e", "outputs": {}, "resources": [ @@ -228,18 +228,16 @@ { "mode": "managed", "type": "ovh_domain_zone_record", - "name": "haumdaucher_subdomains", - "each": "map", + "name": "haumdaucher_wildcard_domain", "provider": "provider.ovh", "instances": [ { - "index_key": "corona", "schema_version": 0, "attributes": { - "fieldtype": "CNAME", - "id": "5110449971", - "subdomain": "corona", - "target": "haumdaucher.de.", + "fieldtype": "A", + "id": "5112336220", + "subdomain": "*", + "target": "91.121.84.190", "ttl": 60, "zone": "haumdaucher.de" }, diff --git a/terraform/terraform.tfstate.backup b/terraform/terraform.tfstate.backup index b350394..00a045a 100644 --- a/terraform/terraform.tfstate.backup +++ b/terraform/terraform.tfstate.backup @@ -1,7 +1,7 @@ { "version": 4, "terraform_version": "0.12.20", - "serial": 67, + "serial": 71, "lineage": "8aff5d23-05f6-10eb-0ae6-1084c787677e", "outputs": {}, "resources": [ @@ -217,29 +217,7 @@ "fieldtype": "A", "id": "5106871420", "subdomain": "", - "target": "91.121.64.43", - "ttl": 60, - "zone": "haumdaucher.de" - }, - "private": "bnVsbA==" - } - ] - }, - { - "mode": "managed", - "type": "ovh_domain_zone_record", - "name": "haumdaucher_subdomains", - "each": "map", - "provider": "provider.ovh", - "instances": [ - { - "index_key": "corona", - "schema_version": 0, - "attributes": { - "fieldtype": "CNAME", - "id": "5110449971", - "subdomain": "corona", - "target": "haumdaucher.de.", + "target": "91.121.84.190", "ttl": 60, "zone": "haumdaucher.de" },