fix: remove broken kube configs from state

Broke when i redid the cluster ca stuff to fix an expired cert. Cant
figure out how to fix the state to read from the cluster.
This commit is contained in:
Julian Tölle 2023-02-25 23:21:49 +01:00
parent ad3ba9d059
commit 6ea9911f29
11 changed files with 203 additions and 409 deletions

View file

@ -39,12 +39,18 @@ resource "hcloud_load_balancer_network" "k3s" {
}
resource "hcloud_rdns" "k3s" {
resource "hcloud_rdns" "k3s_ipv4" {
load_balancer_id = hcloud_load_balancer.k3s.id
ip_address = hcloud_load_balancer.k3s.ipv4
dns_ptr = var.domain
}
resource "hcloud_rdns" "k3s_ipv6" {
load_balancer_id = hcloud_load_balancer.k3s.id
ip_address = hcloud_load_balancer.k3s.ipv6
dns_ptr = var.domain
}
### LB Ingress
resource "hcloud_load_balancer_service" "ingress_https" {
@ -60,3 +66,30 @@ resource "hcloud_load_balancer_service" "ingress_http" {
listen_port = 80
destination_port = 32080
}
### Domain
resource "hetznerdns_record" "ipv4" {
zone_id = var.dns_zone_id
name = var.domain
value = hcloud_load_balancer.k3s.ipv4
type = "A"
ttl = 60
}
resource "hetznerdns_record" "ipv6" {
zone_id = var.dns_zone_id
name = var.domain
value = hcloud_load_balancer.k3s.ipv6
type = "AAAA"
ttl = 60
}
resource "hetznerdns_record" "wildcard" {
# *.domain CNAME domain
zone_id = var.dns_zone_id
name = "*"
value = var.domain
type = "CNAME"
ttl = 60
}