File tree Expand file tree Collapse file tree 8 files changed +18
-10
lines changed
container-app-environment Expand file tree Collapse file tree 8 files changed +18
-10
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11resource "azurerm_container_app_environment" "main" {
22 name = var. name
3- location = data . azurerm_resource_group . main . location
3+ location = var . location
44 resource_group_name = var. resource_group_name
55 log_analytics_workspace_id = var. log_analytics_workspace_id
66 infrastructure_subnet_id = var. vnet_integration_subnet_id
Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ variable "resource_group_name" {
88 type = string
99}
1010
11+ variable "location" {
12+ type = string
13+ description = " The location/region where the container app environment is created."
14+ default = " UK South"
15+ }
16+
1117variable "log_analytics_workspace_id" {
1218 type = string
1319 description = " ID of the log analytics workspace to send resource logging to via diagnostic settings"
Original file line number Diff line number Diff line change @@ -4,7 +4,3 @@ data "azurerm_key_vault_secrets" "app" {
44
55 key_vault_id = var. app_key_vault_id
66}
7-
8- data "azurerm_resource_group" "main" {
9- name = var. resource_group_name
10- }
Original file line number Diff line number Diff line change 11module "container_app_identity" {
22 source = " ../managed-identity"
33 resource_group_name = var. resource_group_name
4- location = data . azurerm_resource_group . main . location
4+ location = var . location
55 uai_name = " ${ var . name } -identity"
66}
77
@@ -11,7 +11,7 @@ module "key_vault_reader_role" {
1111
1212 source = " ../rbac-assignment"
1313
14- scope = data . azurerm_resource_group . main . id
14+ scope = var . app_key_vault_id
1515 role_definition_name = " Key Vault Secrets User"
1616 principal_id = module. container_app_identity . principal_id
1717}
Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ variable "name" {
33 type = string
44}
55
6+ variable "location" {
7+ type = string
8+ description = " The location/region where the container app is created."
9+ default = " UK South"
10+ }
11+
612variable "container_app_environment_id" {
713 description = " ID of the container app environment."
814 type = string
Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ locals {
157157 virtual-machine = lower (" ${ var . env } -${ var . application } " )
158158 win-virtual-machine = lower (" ${ var . env } -${ var . application } " )
159159 virtual-network = upper (" VNET-${ var . env } -${ var . location_map [var . location ]} -${ var . application } " )
160+ virtual-network-lowercase = lower (" vnet-${ var . env } -${ var . location_map [var . location ]} -${ var . application } " )
160161 vnet-gateway = lower (" GWY-${ var . env } -${ var . location_map [var . location ]} -${ var . application } " )
161162 }
162163}
Original file line number Diff line number Diff line change @@ -97,4 +97,6 @@ variable "application" {
9797variable "tags" {
9898 type = map (string )
9999 description = " Default tags for the deployment"
100+ default = {}
101+ nullable = false
100102}
You can’t perform that action at this time.
0 commit comments