Skip to content

Commit

Permalink
add dns prefix variable to dns module
Browse files Browse the repository at this point in the history
  • Loading branch information
madsrodal committed Sep 11, 2024
1 parent c47e977 commit f6278ff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ module "dns" {
source = "./modules/dns"
dns_zone_name = "imo-msw-dev.kystverket.cloud"
dns_resource_group_name = "rg-dns"
dns_prefix = "preview"
resource_group_name = azurerm_resource_group.imo_app.name
container_app_id = module.frontend.container_app_id
frontend_fqdn = module.frontend.fqdn
Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/dns/frontend.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "azurerm_dns_cname_record" "frontend" {
name = "www"
name = var.dns_prefix
zone_name = var.dns_zone_name
resource_group_name = var.dns_resource_group_name
ttl = 3600
Expand Down
4 changes: 4 additions & 0 deletions terraform/modules/dns/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ variable "dns_resource_group_name" {
type = string
}

variable "dns_prefix" {
type = string
}

variable "resource_group_name" {
type = string
}
Expand Down

0 comments on commit f6278ff

Please sign in to comment.