refactor(terraform): move shelly to projects/shelly_taupunktluefter and flatten core infra
This commit is contained in:
@@ -0,0 +1,197 @@
|
||||
provider "ovh" {
|
||||
endpoint = "ovh-eu"
|
||||
application_key = "grBXP8S9ugOfjfpj"
|
||||
application_secret = "6mMRIUxMWaXff631ulc2jj5HybGg4ESx"
|
||||
consumer_key = "m3D43OxSD03iyfKenn1fQ1AVl3eXodKn"
|
||||
}
|
||||
|
||||
locals {
|
||||
ttl = "60"
|
||||
}
|
||||
|
||||
## old moritzgrafde
|
||||
## => 91.121.84.190
|
||||
## super old docker compose host
|
||||
## => 91.121.64.43
|
||||
|
||||
variable "subdomains_moritzgraf" {
|
||||
default = ["auth", "prometheus", "alertmanager", "chat", "mqtt", "cloud",
|
||||
"monitoring", "smtp", "pop3", "imap", "jaeger", "ldap", "code", "hub",
|
||||
"grafana", "phpmyadmin", "webapp", "kc", "phppgadmin", "www", "rstudio", "code"]
|
||||
}
|
||||
|
||||
resource "ovh_domain_zone_record" "moritzgraf_subdomains" {
|
||||
for_each = toset(var.subdomains_moritzgraf)
|
||||
zone = "moritzgraf.de"
|
||||
subdomain = each.key
|
||||
fieldtype = "CNAME"
|
||||
ttl = local.ttl
|
||||
target = "moritzgraf.de."
|
||||
}
|
||||
|
||||
|
||||
## new haumdaucher k8s
|
||||
|
||||
variable "subdomains_moritzgraf_k8s" {
|
||||
default = ["tt-rss", "git"]
|
||||
}
|
||||
|
||||
resource "ovh_domain_zone_record" "moritzgraf_subdomains_k8s" {
|
||||
for_each = toset(var.subdomains_moritzgraf_k8s)
|
||||
zone = "moritzgraf.de"
|
||||
subdomain = each.key
|
||||
fieldtype = "CNAME"
|
||||
ttl = local.ttl
|
||||
target = "haumdaucher.de."
|
||||
}
|
||||
|
||||
# Kochen
|
||||
resource "ovh_domain_zone_record" "kochen_haumdaucher" {
|
||||
zone = "haumdaucher.de"
|
||||
subdomain = "kochen"
|
||||
fieldtype = "CNAME"
|
||||
ttl = local.ttl
|
||||
target = "haumdaucher-datalab.github.io."
|
||||
}
|
||||
|
||||
## nodes
|
||||
|
||||
resource "ovh_domain_zone_record" "one" {
|
||||
zone = "haumdaucher.de"
|
||||
subdomain = "one"
|
||||
fieldtype = "A"
|
||||
ttl = local.ttl
|
||||
#target = "91.121.84.190"
|
||||
target = "136.243.23.215"
|
||||
}
|
||||
|
||||
## krassescheisse
|
||||
|
||||
resource "ovh_domain_zone_record" "krassescheisse_subdomains" {
|
||||
for_each = toset(var.subdomains_moritzgraf)
|
||||
zone = "krassescheisse.de"
|
||||
subdomain = each.key
|
||||
fieldtype = "CNAME"
|
||||
ttl = local.ttl
|
||||
target = "krassescheisse.de."
|
||||
}
|
||||
|
||||
|
||||
variable "subdomains_haumdaucher" {
|
||||
default = []
|
||||
}
|
||||
|
||||
# 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" {
|
||||
default = ["moritzgraf.de"
|
||||
, "graf-fam.de"
|
||||
, "krassescheisse.de"]
|
||||
}
|
||||
|
||||
resource "ovh_domain_zone_record" "haumdaucher_domain" {
|
||||
zone = "haumdaucher.de"
|
||||
subdomain = ""
|
||||
fieldtype = "A"
|
||||
ttl = local.ttl
|
||||
#target = "91.121.84.190"
|
||||
target = "136.243.23.215"
|
||||
}
|
||||
|
||||
resource "ovh_domain_zone_record" "haumdaucher_wildcard_domain" {
|
||||
zone = "haumdaucher.de"
|
||||
subdomain = "*"
|
||||
fieldtype = "A"
|
||||
ttl = local.ttl
|
||||
#target = "91.121.84.190"
|
||||
target = "136.243.23.215"
|
||||
}
|
||||
|
||||
resource "ovh_domain_zone_record" "moritzgraf_domain" {
|
||||
zone = "moritzgraf.de"
|
||||
subdomain = ""
|
||||
fieldtype = "A"
|
||||
ttl = local.ttl
|
||||
target = "136.243.23.215"
|
||||
}
|
||||
|
||||
resource "ovh_domain_zone_record" "moritzgraf_wildcard_domain" {
|
||||
zone = "moritzgraf.de"
|
||||
subdomain = "*"
|
||||
fieldtype = "A"
|
||||
ttl = local.ttl
|
||||
#target = "91.121.84.190"
|
||||
target = "136.243.23.215"
|
||||
}
|
||||
|
||||
######################################
|
||||
## ameliegraf.de
|
||||
|
||||
locals {
|
||||
|
||||
# adobe
|
||||
first = "151.101.128.119"
|
||||
second = "151.101.192.119"
|
||||
}
|
||||
|
||||
resource "ovh_domain_zone_record" "ameliegraf_de_first" {
|
||||
zone = "ameliegraf.de"
|
||||
subdomain = ""
|
||||
fieldtype = "A"
|
||||
ttl = local.ttl
|
||||
#target = "91.121.84.190"
|
||||
target = local.first
|
||||
}
|
||||
resource "ovh_domain_zone_record" "ameliegraf_de_second" {
|
||||
zone = "ameliegraf.de"
|
||||
subdomain = ""
|
||||
fieldtype = "A"
|
||||
ttl = local.ttl
|
||||
#target = "91.121.84.190"
|
||||
target = local.second
|
||||
}
|
||||
|
||||
resource "ovh_domain_zone_record" "wildcard_ameliegraf_de_first" {
|
||||
zone = "ameliegraf.de"
|
||||
subdomain = "*"
|
||||
fieldtype = "A"
|
||||
ttl = local.ttl
|
||||
#target = "91.121.84.190"
|
||||
target = local.first
|
||||
}
|
||||
resource "ovh_domain_zone_record" "wildcard_ameliegraf_de_second" {
|
||||
zone = "ameliegraf.de"
|
||||
subdomain = "*"
|
||||
fieldtype = "A"
|
||||
ttl = local.ttl
|
||||
#target = "91.121.84.190"
|
||||
target = local.second
|
||||
}
|
||||
|
||||
######################################
|
||||
## grabengasse7.de
|
||||
|
||||
resource "ovh_domain_zone_record" "grabengasse7_de_domain" {
|
||||
zone = "grabengasse7.de"
|
||||
subdomain = ""
|
||||
fieldtype = "A"
|
||||
ttl = local.ttl
|
||||
target = "136.243.23.215"
|
||||
}
|
||||
|
||||
resource "ovh_domain_zone_record" "grabengasse7_de_wildcard" {
|
||||
zone = "grabengasse7.de"
|
||||
subdomain = "*"
|
||||
fieldtype = "A"
|
||||
ttl = local.ttl
|
||||
target = "136.243.23.215"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user