Skip to content

Commit

Permalink
fix syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
lonegunmanb committed Dec 4, 2023
1 parent e388792 commit b577a56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ locals {
existing_application_gateway_subnet_subscription_id_for_ingress = try(local.existing_application_gateway_subnet_segments[2], null)
existing_application_gateway_subnet_vnet_name = try(local.existing_application_gateway_subnet_segments[8], null)
existing_application_gateway_subscription_id_for_ingress = try(local.existing_application_gateway_segments_for_ingress[2], null)
ingress_application_gateway_enabled = var.brown_field_application_gateway_for_ingress != null || var.green_field_application_gateway_for_ingress != null
ingress_application_gateway_enabled = local.use_brown_field_gw_for_ingress || local.use_green_field_gw_for_ingress
# Abstract the decision whether to use an Analytics Workspace supplied via vars, provision one ourselves or leave it null.
# This guarantees that local.log_analytics_workspace will contain a valid `id` and `name` IFF log_analytics_workspace_enabled
# is set to `true`.
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ data "azurerm_resource_group" "aks_rg" {
}

resource "azurerm_role_assignment" "application_gateway_resource_group_reader" {
count = var.create_role_assignments_for_application_gateway ? 1 : 0
count = var.create_role_assignments_for_application_gateway && local.ingress_application_gateway_enabled ? 1 : 0

principal_id = azurerm_kubernetes_cluster.main.ingress_application_gateway[0].ingress_application_gateway_identity[0].object_id
scope = local.use_brown_field_gw_for_ingress ? data.azurerm_resource_group.ingress_gw[0].id : data.azurerm_resource_group.aks_rg[0].id
Expand Down

0 comments on commit b577a56

Please sign in to comment.