21 lines
546 B
Terraform
Raw Normal View History

# TODO: Switch to not requiring trailing period?
variable "dns_root" {
description = "DNS domain root with trailing period. Example: \"foo.bar.com.\""
type = string
}
resource "google_dns_managed_zone" "zone" {
project = google_project.project.project_id
name = "dns-zone"
dns_name = var.dns_root
depends_on = [google_project_service.service["dns"], ]
}
output "dns_name_servers" {
description = "Create NS records pointing your domain at these servers."
value = google_dns_managed_zone.zone.name_servers
}