terraform-ske-rancher/05-dns.tf
Mauritz Uphoff 077f9383ed
All checks were successful
CI / Terraform Format & Validate (push) Successful in 40s
CI / TruffleHog Secrets Scan (push) Successful in 57s
fmt code
2025-05-15 08:51:58 +02:00

18 lines
No EOL
599 B
HCL

resource "stackit_dns_zone" "rancher_zone" {
project_id = var.stackit_project_id
name = "rancher${random_string.random.result}"
dns_name = "rancher${random_string.random.result}.runs.onstackit.cloud"
type = "primary"
default_ttl = 60
contact_email = "hostmaster@stackit.cloud"
}
resource "stackit_dns_record_set" "ui_a_record" {
project_id = var.stackit_project_id
zone_id = stackit_dns_zone.rancher_zone.zone_id
name = "ui"
type = "A"
ttl = 60
comment = "ui for rancher"
records = [stackit_public_ip.public_ip.ip]
}