chore: migrate state to CloudFlare
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c4c8178f12
commit
82c67a6480
2 changed files with 106 additions and 5 deletions
91
infrastructure/dns.tf
Normal file
91
infrastructure/dns.tf
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
resource "hetznerdns_zone" "icb4dc0de" {
|
||||||
|
name = "icb4dc0.de"
|
||||||
|
ttl = 86400
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "ns_primary" {
|
||||||
|
zone_id = hetznerdns_zone.icb4dc0de.id
|
||||||
|
name = "@"
|
||||||
|
type = "NS"
|
||||||
|
value = "helium.ns.hetzner.de."
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "ns_secondary" {
|
||||||
|
zone_id = hetznerdns_zone.icb4dc0de.id
|
||||||
|
name = "@"
|
||||||
|
type = "NS"
|
||||||
|
value = "oxygen.ns.hetzner.com."
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "ns_ternary" {
|
||||||
|
zone_id = hetznerdns_zone.icb4dc0de.id
|
||||||
|
name = "@"
|
||||||
|
type = "NS"
|
||||||
|
value = "hydrogen.ns.hetzner.com."
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "soa" {
|
||||||
|
zone_id = hetznerdns_zone.icb4dc0de.id
|
||||||
|
name = "@"
|
||||||
|
type = "SOA"
|
||||||
|
value = "hydrogen.ns.hetzner.com. dns.hetzner.com. 2023120305 86400 10800 3600000 3600"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "mx_primary" {
|
||||||
|
zone_id = hetznerdns_zone.icb4dc0de.id
|
||||||
|
name = "@"
|
||||||
|
type = "MX"
|
||||||
|
value = "10 mx01.mail.icloud.com."
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "mx_secondary" {
|
||||||
|
zone_id = hetznerdns_zone.icb4dc0de.id
|
||||||
|
name = "@"
|
||||||
|
type = "MX"
|
||||||
|
value = "10 mx02.mail.icloud.com."
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "apple_proof" {
|
||||||
|
zone_id = hetznerdns_zone.icb4dc0de.id
|
||||||
|
name = "@"
|
||||||
|
type = "TXT"
|
||||||
|
value = "apple-domain=chwbVvzH8hWIgg1l"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "apple_spf" {
|
||||||
|
zone_id = hetznerdns_zone.icb4dc0de.id
|
||||||
|
name = "@"
|
||||||
|
type = "TXT"
|
||||||
|
value = "\"v=spf1 include:icloud.com ~all\""
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "apple_sig_domainkey" {
|
||||||
|
zone_id = hetznerdns_zone.icb4dc0de.id
|
||||||
|
name = "sig1._domainkey"
|
||||||
|
type = "CNAME"
|
||||||
|
value = "sig1.dkim.icb4dc0.de.at.icloudmailadmin.com."
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "wildcard_ipv4" {
|
||||||
|
zone_id = hetznerdns_zone.icb4dc0de.id
|
||||||
|
name = "*"
|
||||||
|
type = "A"
|
||||||
|
value = "65.109.42.5"
|
||||||
|
ttl = 300
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "wildcard_ipv6" {
|
||||||
|
zone_id = hetznerdns_zone.icb4dc0de.id
|
||||||
|
name = "*"
|
||||||
|
type = "AAAA"
|
||||||
|
value = "2a01:4f9:c01d:4f1::1"
|
||||||
|
ttl = 300
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "k8s" {
|
||||||
|
zone_id = hetznerdns_zone.icb4dc0de.id
|
||||||
|
name = "k8s"
|
||||||
|
type = "AAAA"
|
||||||
|
value = "2a01:4f9:c012:7d4b::1"
|
||||||
|
ttl = 60
|
||||||
|
}
|
|
@ -2,10 +2,16 @@
|
||||||
terraform {
|
terraform {
|
||||||
required_version = ">= 0.14"
|
required_version = ">= 0.14"
|
||||||
|
|
||||||
backend "kubernetes" {
|
backend "s3" {
|
||||||
secret_suffix = "state"
|
bucket = "tfstate"
|
||||||
config_path = "~/.kube/hetzner.yaml"
|
key = "terraform.tfstate"
|
||||||
namespace = "infrastructure"
|
region = "us-east-1"
|
||||||
|
endpoint = "https://2df513adaee2eeae12106af900bed297.r2.cloudflarestorage.com"
|
||||||
|
skip_metadata_api_check = true
|
||||||
|
skip_region_validation = true
|
||||||
|
skip_credentials_validation = true
|
||||||
|
use_path_style = true
|
||||||
|
skip_s3_checksum = true
|
||||||
}
|
}
|
||||||
|
|
||||||
required_providers {
|
required_providers {
|
||||||
|
@ -13,6 +19,10 @@ terraform {
|
||||||
source = "hetznercloud/hcloud"
|
source = "hetznercloud/hcloud"
|
||||||
version = "1.44.1"
|
version = "1.44.1"
|
||||||
}
|
}
|
||||||
|
hetznerdns = {
|
||||||
|
source = "timohirt/hetznerdns"
|
||||||
|
version = "2.2.0"
|
||||||
|
}
|
||||||
ct = {
|
ct = {
|
||||||
source = "poseidon/ct"
|
source = "poseidon/ct"
|
||||||
version = "0.11.0"
|
version = "0.11.0"
|
||||||
|
|
Loading…
Reference in a new issue