This commit is contained in:
Peter Williams 2023-03-10 16:36:27 -05:00
Родитель 50b8ab4494
Коммит da36c6146b
2 изменённых файлов: 36 добавлений и 0 удалений

26
dev/dns.tf Normal file
Просмотреть файл

@ -0,0 +1,26 @@
# The base DNS configuration.
resource "azurerm_dns_zone" "flagship" {
name = var.tld
resource_group_name = azurerm_resource_group.permanent.name
lifecycle {
prevent_destroy = true
}
}
#resource "azurerm_dns_a_record" "root_a" {
# name = "@"
# zone_name = azurerm_dns_zone.flagship.name
# resource_group_name = azurerm_dns_zone.flagship.resource_group_name
# ttl = 3600
# records = [azurerm_public_ip.frontend.ip_address]
#}
resource "azurerm_dns_cname_record" "www" {
name = "www"
zone_name = azurerm_dns_zone.flagship.name
resource_group_name = azurerm_dns_zone.flagship.resource_group_name
ttl = 3600
record = "${var.tld}."
}

10
dev/permanent.tf Normal file
Просмотреть файл

@ -0,0 +1,10 @@
# The resource group for things that should never be deleted.
resource "azurerm_resource_group" "permanent" {
name = "${var.prefix}-permanent"
location = var.location
lifecycle {
prevent_destroy = true
}
}