Skip to content

Commit

Permalink
add old.tietokilta.fi for old website
Browse files Browse the repository at this point in the history
  • Loading branch information
kahlstrm committed May 19, 2024
1 parent cdd8cd1 commit 48c21a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions modules/dns/root/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ resource "azurerm_dns_a_record" "root_a" {
records = ["130.233.48.30"]
}

# record for old website
resource "azurerm_dns_a_record" "old_a" {
name = "old"
resource_group_name = azurerm_resource_group.dns_rg.name
zone_name = azurerm_dns_zone.root_zone.name
ttl = 300
records = ["130.233.48.30"]
}

# CNAME record for www.
resource "azurerm_dns_cname_record" "www_cname" {
name = "www"
Expand Down
2 changes: 1 addition & 1 deletion modules/web/dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ terraform {
}

locals {
fqdn = "${var.subdomain}.${var.root_zone_name}"
fqdn = var.subdomain == "@" ? var.root_zone_name : "${var.subdomain}.${var.root_zone_name}"
}
# A record for the web app
Expand Down

0 comments on commit 48c21a9

Please sign in to comment.