terraform-ske-nginx-rate-limit/05-dns.tf
Mauritz Uphoff ea19003e9c
All checks were successful
CI / TruffleHog Secrets Scan (push) Successful in 4s
CI / Terraform Format & Validate (push) Successful in 5s
Initial commit
2025-05-15 11:02:49 +02:00

18 lines
No EOL
561 B
HCL

resource "stackit_dns_zone" "svc_zone" {
project_id = var.stackit_project_id
name = random_string.random.result
dns_name = "${random_string.random.result}.runs.onstackit.cloud"
type = "primary"
default_ttl = 60
contact_email = "hostmaster@stackit.cloud"
}
resource "stackit_dns_record_set" "svc" {
project_id = var.stackit_project_id
zone_id = stackit_dns_zone.svc_zone.zone_id
name = "nginx"
type = "A"
ttl = 60
comment = "a record"
records = [stackit_public_ip.public_ip.ip]
}