dev: add our first resources
This commit is contained in:
Родитель
50b8ab4494
Коммит
da36c6146b
|
@ -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}."
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче