Files
noahspan-root/infrastructure/app_config.tf
2025-01-21 12:43:04 -06:00

47 lines
1.5 KiB
HCL

data "azurerm_client_config" "current" {}
data "azurerm_user_assigned_identity" "user_assigned_identity" {
name = "noahspanflyingdevuser"
resource_group_name = azurerm_resource_group.resource_group.name
}
resource "azurerm_app_configuration" "app_configuration" {
name = "noahspan-appconfig"
resource_group_name = azurerm_resource_group.resource_group.name
location = azurerm_resource_group.resource_group.location
identity {
type = "UserAssigned"
identity_ids = [
data.azurerm_user_assigned_identity.user_assigned_identity.id
]
}
}
resource "azurerm_role_assignment" "role_assignment" {
scope = azurerm_app_configuration.app_configuration.id
role_definition_name = "App Configuration Data Owner"
principal_id = data.azurerm_client_config.current.object_id
}
# resource "azurerm_app_configuration_feature" "flying-pilots" {
# configuration_store_id = azurerm_app_configuration.app_configuration.id
# description = "Feature flag for pilots page in flying app"
# name = "flying-pilots"
# label = "flying-pilots-label"
# enabled = false
# depends_on = [ azurerm_role_assignment.role_assignment ]
# }
# resource "azurerm_app_configuration_feature" "flying-logbook" {
# configuration_store_id = azurerm_app_configuration.app_configuration.id
# description = "Feature flag for logbook page in flying app"
# name = "flying-logbook"
# label = "flying-logbook-label"
# enabled = false
# depends_on = [ azurerm_role_assignment.role_assignment ]
# }