Skip to content

Commit

Permalink
add replace and shorter frontend name
Browse files Browse the repository at this point in the history
  • Loading branch information
madsrodal committed Sep 12, 2024
1 parent f26dc19 commit e839cf3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions terraform/modules/dns/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ resource "azurerm_dns_txt_record" "txt_record" {
}

resource "terraform_data" "custom_domain" {
triggers_replace = [
azurerm_dns_cname_record.cname_record.name,
data.azurerm_dns_zone.dns_zone.name,
var.container_app_resource_group_name,
var.container_app_name,
var.container_app_environment_name
]

input = {
public_hostname = "${azurerm_dns_cname_record.cname_record.name}.${data.azurerm_dns_zone.dns_zone.name}"
resource_group_name = var.container_app_resource_group_name
Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/frontend/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
locals {
create_dns = var.app == "imo-msw" && var.env == "dev-preview" ? 1 : 0
container_app_name = "ca-${var.app}-frontend-${var.env}-rename-test"
container_app_name = "ca-${var.app}-frontend-${var.env}-2"
dns_zone_name = "imo-msw-dev.kystverket.cloud"
dns_prefix = "preview"
dns_resource_group_name = "rg-dns"
Expand Down

0 comments on commit e839cf3

Please sign in to comment.