Skip to content

Commit

Permalink
Apply terraform fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 31, 2024
1 parent 790b0ba commit e340126
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 47 deletions.
64 changes: 32 additions & 32 deletions app_services.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ resource "azurerm_app_service_virtual_network_swift_connection" "vnet_config" {
}

module "windows_web_apps" {
source = "./modules/webapps/windows_webapps"
depends_on = [module.networking]
for_each = local.webapp.windows_web_apps
name = each.value.name
client_config = local.client_config
dynamic_app_settings = try(each.value.dynamic_app_settings, {})
app_service_plan_id = can(each.value.app_service_plan_id) ? each.value.app_service_plan_id : local.combined_objects_app_service_plans[try(each.value.lz_key, local.client_config.landingzone_key)][each.value.app_service_plan_key].id
combined_objects = local.dynamic_app_settings_combined_objects
global_settings = local.global_settings
settings = each.value.settings
identity = try(each.value.identity, null)
app_settings = try(each.value.app_settings, null)
connection_string = try(each.value.connection_string, {})
vnets = local.combined_objects_networking
virtual_subnets = local.combined_objects_virtual_subnets
subnet_id = can(each.value.subnet_id) || can(each.value.vnet_key) == false ? try(each.value.subnet_id, null) : local.combined_objects_networking[try(each.value.lz_key, local.client_config.landingzone_key)][each.value.vnet_key].subnets[each.value.subnet_key].id
source = "./modules/webapps/windows_webapps"
depends_on = [module.networking]
for_each = local.webapp.windows_web_apps
name = each.value.name
client_config = local.client_config
dynamic_app_settings = try(each.value.dynamic_app_settings, {})
app_service_plan_id = can(each.value.app_service_plan_id) ? each.value.app_service_plan_id : local.combined_objects_app_service_plans[try(each.value.lz_key, local.client_config.landingzone_key)][each.value.app_service_plan_key].id
combined_objects = local.dynamic_app_settings_combined_objects
global_settings = local.global_settings
settings = each.value.settings
identity = try(each.value.identity, null)
app_settings = try(each.value.app_settings, null)
connection_string = try(each.value.connection_string, {})
vnets = local.combined_objects_networking
virtual_subnets = local.combined_objects_virtual_subnets
subnet_id = can(each.value.subnet_id) || can(each.value.vnet_key) == false ? try(each.value.subnet_id, null) : local.combined_objects_networking[try(each.value.lz_key, local.client_config.landingzone_key)][each.value.vnet_key].subnets[each.value.subnet_key].id
remote_objects = {
subnets = try(local.combined_objects_networking[try(each.value.settings.lz_key, local.client_config.landingzone_key)][each.value.settings.vnet_key].subnets, null)
}
Expand All @@ -85,22 +85,22 @@ output "windows_web_apps" {
}

module "linux_web_apps" {
source = "./modules/webapps/linux_webapps"
depends_on = [module.networking]
for_each = local.webapp.linux_web_apps
name = each.value.name
client_config = local.client_config
dynamic_app_settings = try(each.value.dynamic_app_settings, {})
app_service_plan_id = can(each.value.app_service_plan_id) ? each.value.app_service_plan_id : local.combined_objects_app_service_plans[try(each.value.lz_key, local.client_config.landingzone_key)][each.value.app_service_plan_key].id
combined_objects = local.dynamic_app_settings_combined_objects
global_settings = local.global_settings
settings = each.value.settings
identity = try(each.value.identity, null)
app_settings = try(each.value.app_settings, null)
connection_string = try(each.value.connection_string, {})
vnets = local.combined_objects_networking
virtual_subnets = local.combined_objects_virtual_subnets
subnet_id = can(each.value.subnet_id) || can(each.value.vnet_key) == false ? try(each.value.subnet_id, null) : local.combined_objects_networking[try(each.value.lz_key, local.client_config.landingzone_key)][each.value.vnet_key].subnets[each.value.subnet_key].id
source = "./modules/webapps/linux_webapps"
depends_on = [module.networking]
for_each = local.webapp.linux_web_apps
name = each.value.name
client_config = local.client_config
dynamic_app_settings = try(each.value.dynamic_app_settings, {})
app_service_plan_id = can(each.value.app_service_plan_id) ? each.value.app_service_plan_id : local.combined_objects_app_service_plans[try(each.value.lz_key, local.client_config.landingzone_key)][each.value.app_service_plan_key].id
combined_objects = local.dynamic_app_settings_combined_objects
global_settings = local.global_settings
settings = each.value.settings
identity = try(each.value.identity, null)
app_settings = try(each.value.app_settings, null)
connection_string = try(each.value.connection_string, {})
vnets = local.combined_objects_networking
virtual_subnets = local.combined_objects_virtual_subnets
subnet_id = can(each.value.subnet_id) || can(each.value.vnet_key) == false ? try(each.value.subnet_id, null) : local.combined_objects_networking[try(each.value.lz_key, local.client_config.landingzone_key)][each.value.vnet_key].subnets[each.value.subnet_key].id
remote_objects = {
subnets = try(local.combined_objects_networking[try(each.value.settings.lz_key, local.client_config.landingzone_key)][each.value.settings.vnet_key].subnets, null)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ app_service_plans = {
}

windows_web_apps = {
windows_web_app_simple = {
windows_web_app_simple = {
name = "windows-web-app-simple"
resource_group_key = "windows_webapp_simple"
app_service_plan_key = "asp1"
Expand All @@ -43,11 +43,11 @@ windows_web_apps = {
always_on = "false"

site_config = {
ftps_state = "Disabled"
always_on = "false"
ftps_state = "Disabled"
always_on = "false"

application_stack = {
current_stack = "dotnetcore"
current_stack = "dotnetcore"
dotnet_core_version = "v4.0"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ app_service_plans = {
}

linux_web_apps = {
linux_web_app_simple = {
linux_web_app_simple = {
name = "linux-web-app-simple"
resource_group_key = "linux_webapp_simple"
app_service_plan_key = "asp1"
Expand All @@ -43,11 +43,11 @@ linux_web_apps = {
always_on = "false"

site_config = {
ftps_state = "Disabled"
always_on = "false"
ftps_state = "Disabled"
always_on = "false"

application_stack = {
java_server = "JAVA"
java_server = "JAVA"
java_version = "11"
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/webapps/linux_webapps/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ locals {
try(var.app_settings, {}),
try(local.dynamic_settings_to_process, {})
)

location = coalesce(var.location, var.resource_group.location)
resource_group_name = coalesce(var.resource_group_name, var.resource_group.name)
backup_storage_account = can(var.settings.backup) ? var.storage_accounts[try(var.settings.backup.lz_key, var.client_config.landingzone_key)][var.settings.backup.storage_account_key] : null
Expand Down
2 changes: 1 addition & 1 deletion modules/webapps/linux_webapps/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ output "id" {
description = "The ID of the App Service."
}
output "default_hostname" {
value = azurerm_linux_web_app.linux_web_apps.default_hostname
value = azurerm_linux_web_app.linux_web_apps.default_hostname
description = "The Default Hostname associated with the Linux Web App"
}
output "outbound_ip_addresses" {
Expand Down
2 changes: 1 addition & 1 deletion modules/webapps/windows_webapps/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ locals {
try(var.settings.tags,
null)
)

app_settings = merge(
var.application_insight == null ? {} : {
"APPINSIGHTS_INSTRUMENTATIONKEY" = var.application_insight.instrumentation_key,
Expand Down
2 changes: 1 addition & 1 deletion modules/webapps/windows_webapps/module.tf
Original file line number Diff line number Diff line change
Expand Up @@ -469,4 +469,4 @@ resource "azurerm_app_service_virtual_network_swift_connection" "vnet_config" {
try(var.settings.subnet_id, null)
)
}

2 changes: 1 addition & 1 deletion modules/webapps/windows_webapps/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ output "id" {
description = "The ID of the App Service."
}
output "default_hostname" {
value = azurerm_windows_web_app.windows_web_apps.default_hostname
value = azurerm_windows_web_app.windows_web_apps.default_hostname
description = "The Default Hostname associated with the Linux Web App"
}
output "outbound_ip_addresses" {
Expand Down

0 comments on commit e340126

Please sign in to comment.