-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathapp-configuration.tf
More file actions
21 lines (17 loc) · 912 Bytes
/
app-configuration.tf
File metadata and controls
21 lines (17 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
resource "azurerm_app_configuration" "default" {
count = local.enable_app_configuration ? 1 : 0
name = "${local.resource_prefix}appconfig"
resource_group_name = local.resource_group.name
location = local.resource_group.location
sku = local.app_configuration_sku
local_auth_enabled = true
public_network_access = local.app_configuration_sku == "free" ? "Enabled" : "Disabled"
tags = local.tags
}
resource "azurerm_role_assignment" "containerapp_appconfig_read" {
count = local.enable_app_configuration && local.app_configuration_assign_role ? 1 : 0
scope = azurerm_app_configuration.default[0].id
role_definition_name = "App Configuration Data Reader"
principal_id = azurerm_user_assigned_identity.containerapp[0].id
description = "Allow Azure Container Apps to read data from App Configuration"
}