Skip to content

Commit

Permalink
Ak hotfix ase privatedns record name (#39)
Browse files Browse the repository at this point in the history
* concate asename into private dns record name
* Update private dns a record ase name logic
  • Loading branch information
iriahk89 authored Sep 28, 2020
1 parent dea3478 commit 41a721b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions modules/databases/mssql_server/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ output identity {
value = try(azurerm_mssql_server.mssql.identity, null)
}

output azuread_administrator {
value = try(azurerm_mssql_server.mssql.azuread_administrator , null)
output azuread_administrator {
value = try(azurerm_mssql_server.mssql.azuread_administrator, null)
}
2 changes: 1 addition & 1 deletion modules/webapps/ase/private_dns_records.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resource "azurerm_private_dns_a_record" "a_records" {
]
for_each = try(var.settings.private_dns_records.a_records, {})

name = format("%s.%s", each.value.name, azurecaf_name.ase.result)
name = each.value.name == "" ? azurecaf_name.ase.result : format("%s.%s", each.value.name, azurecaf_name.ase.result)
resource_group_name = lookup(each.value, "remote_tfstate", null) == null ? var.private_dns[each.value.private_dns_key].resource_group_name : data.terraform_remote_state.ase_vnet_dns[each.key].outputs[each.value.remote_tfstate.output_key][each.value.private_dns_key].resource_group_name
zone_name = lookup(each.value, "remote_tfstate", null) == null ? var.private_dns[each.value.private_dns_key].name : data.terraform_remote_state.ase_vnet_dns[each.key].outputs[each.value.remote_tfstate.output_key][each.value.private_dns_key].name
ttl = each.value.ttl
Expand Down
4 changes: 2 additions & 2 deletions mssql_databases.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ output mssql_databases {
}

module "mssql_databases" {
source = "./modules/databases/mssql_database"
for_each = local.database.mssql_databases
source = "./modules/databases/mssql_database"
for_each = local.database.mssql_databases

global_settings = local.global_settings
settings = each.value
Expand Down

0 comments on commit 41a721b

Please sign in to comment.