Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.

Commit b88e758

Browse files
committed
Remove unused var
This definition is in the wrong place, this var is defined in function_app
1 parent 5d0f9df commit b88e758

File tree

2 files changed

+9
-37
lines changed

2 files changed

+9
-37
lines changed

infrastructure/tf-core/function_app.tf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,30 +70,30 @@ locals {
7070
WEBSITE_PULL_IMAGE_OVER_VNET = var.features.private_endpoints_enabled
7171

7272
DATABASE_NAME = "communication_management"
73-
DATABASE_HOST = "${module.regions_config[var.regions.keys[0]].names.postgres-sql-server}.postgres.database.azure.com"
73+
DATABASE_HOST = "${module.regions_config[local.primary_region].names.postgres-sql-server}.postgres.database.azure.com"
7474
DATABASE_USER = "commgt_db_user"
75-
DATABASE_PASSWORD = "@Microsoft.KeyVault(SecretUri=${module.postgresql_flexible_db[var.regions.keys[0]].db_admin_pwd_keyvault_secret})"
75+
DATABASE_PASSWORD = "@Microsoft.KeyVault(SecretUri=${module.postgresql_flexible_db[local.primary_region].db_admin_pwd_keyvault_secret})"
7676

77-
APPLICATION_ID = "@Microsoft.KeyVault(SecretUri=${data.azurerm_key_vault_secret.application_id[var.regions.keys[0]].versionless_id})"
78-
NOTIFY_API_KEY = "@Microsoft.KeyVault(SecretUri=${data.azurerm_key_vault_secret.notify_api_key[var.regions.keys[0]].versionless_id})"
79-
OAUTH2_API_KID = "@Microsoft.KeyVault(SecretUri=${data.azurerm_key_vault_secret.oauth2_api_kid[var.regions.keys[0]].versionless_id})"
80-
OAUTH2_API_KEY = "@Microsoft.KeyVault(SecretUri=${data.azurerm_key_vault_secret.oauth2_api_key[var.regions.keys[0]].versionless_id})"
81-
PRIVATE_KEY = "@Microsoft.KeyVault(SecretUri=${data.azurerm_key_vault_key.private_key[var.regions.keys[0]].versionless_id})"
77+
APPLICATION_ID = "@Microsoft.KeyVault(SecretUri=${data.azurerm_key_vault_secret.application_id[local.primary_region].versionless_id})"
78+
NOTIFY_API_KEY = "@Microsoft.KeyVault(SecretUri=${data.azurerm_key_vault_secret.notify_api_key[local.primary_region].versionless_id})"
79+
OAUTH2_API_KID = "@Microsoft.KeyVault(SecretUri=${data.azurerm_key_vault_secret.oauth2_api_kid[local.primary_region].versionless_id})"
80+
OAUTH2_API_KEY = "@Microsoft.KeyVault(SecretUri=${data.azurerm_key_vault_secret.oauth2_api_key[local.primary_region].versionless_id})"
81+
PRIVATE_KEY = "@Microsoft.KeyVault(SecretUri=${data.azurerm_key_vault_key.private_key[local.primary_region].versionless_id})"
8282
}
8383
)
8484

8585
rbac_role_assignments = flatten([
8686
var.key_vault != {} ? [
8787
for role in local.rbac_roles_key_vault_user : {
8888
role_definition_name = role
89-
scope = module.key_vault[var.regions.keys[0]].key_vault_id
89+
scope = module.key_vault[local.primary_region].key_vault_id
9090
}
9191
] : [],
9292
[
9393
for account in keys(var.storage_accounts) : [
9494
for role in local.rbac_roles_storage : {
9595
role_definition_name = role
96-
scope = module.storage["${account}-${var.regions.keys[0]}"].storage_account_id
96+
scope = module.storage["${account}-${local.primary_region}"].storage_account_id
9797
}
9898
]
9999
]

infrastructure/tf-core/variables.tf

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -260,29 +260,6 @@ variable "postgresql" {
260260
})
261261
}
262262

263-
/*
264-
application_rule_collection = [
265-
{
266-
name = "example-application-rule-collection-1"
267-
priority = 600
268-
action = "Allow"
269-
rule_name = "example-rule-1"
270-
protocols = [
271-
{
272-
type = "Http"
273-
port = 80
274-
},
275-
{
276-
type = "Https"
277-
port = 443
278-
}
279-
]
280-
source_addresses = ["0.0.0.0/0"]
281-
destination_fqdns = ["example.com"]
282-
},
283-
*/
284-
285-
286263
variable "routes" {
287264
description = "Routes configuration for different regions"
288265
type = map(object({
@@ -364,8 +341,3 @@ variable "function_app_slots" {
364341
function_app_slot_enabled = optional(bool, false)
365342
}))
366343
}
367-
368-
variable "app_service_plan_key" {
369-
description = "The key for the app service plan"
370-
type = string
371-
}

0 commit comments

Comments
 (0)