File tree Expand file tree Collapse file tree 4 files changed +53
-2
lines changed
Expand file tree Collapse file tree 4 files changed +53
-2
lines changed Original file line number Diff line number Diff line change 1+ module "acr" {
2+ for_each = var. features . acr_enabled ? var. regions : {}
3+
4+ source = " ../../../dtos-devops-templates/infrastructure/modules/container-registry"
5+
6+ name = module. regions_config [each . key ]. names . azure-container-registry # -${lower(each.key.name_suffix)}"
7+ resource_group_name = azurerm_resource_group. core [each . key ]. name
8+ location = each. key
9+
10+ admin_enabled = var. container_registry . admin_enabled
11+
12+ log_analytics_workspace_id = data. terraform_remote_state . audit . outputs . log_analytics_workspace_id [local . primary_region ]
13+ monitor_diagnostic_setting_acr_enabled_logs = local. monitor_diagnostic_setting_acr_enabled_logs
14+ monitor_diagnostic_setting_acr_metrics = local. monitor_diagnostic_setting_acr_metrics
15+
16+ uai_name = var. container_registry . uai_name
17+ sku = var. container_registry . sku
18+ public_network_access_enabled = var. features . public_network_access_enabled
19+
20+ # Private Endpoint Configuration if enabled
21+ private_endpoint_properties = var. features . private_endpoints_enabled ? {
22+ private_dns_zone_ids = [data.terraform_remote_state.hub.outputs.private_dns_zones[" ${ each . key } -container_registry" ].id]
23+ private_endpoint_enabled = var.features.private_endpoints_enabled
24+ private_endpoint_subnet_id = module.subnets[" ${ module . regions_config [each . key ]. names . subnet } -pep" ].id
25+ private_endpoint_resource_group_name = azurerm_resource_group.rg_private_endpoints[each.key].name
26+ private_service_connection_is_manual = var.features.private_service_connection_is_manual
27+ } : null
28+
29+ tags = var. tags
30+ }
Original file line number Diff line number Diff line change 11locals {
2+ # ACR
3+ monitor_diagnostic_setting_acr_enabled_logs = [" ContainerRegistryRepositoryEvents" , " ContainerRegistryLoginEvents" ]
4+ monitor_diagnostic_setting_acr_metrics = [" AllMetrics" ]
5+
26 # APPSERVICEPLAN
37 monitor_diagnostic_setting_appserviceplan_metrics = [" AllMetrics" ]
48
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ environment = "DEV"
44environment_hub = " dev"
55
66features = {
7- acr_enabled = false
7+ acr_enabled = true
88 api_management_enabled = false
99 event_grid_enabled = false
1010 private_endpoints_enabled = true
@@ -272,6 +272,13 @@ container_apps = {
272272 }
273273}
274274
275+ container_registry = {
276+ name_suffix = " devtest"
277+ admin_enabled = false
278+ uai_name = " dtos-cohort-manager-acr-push"
279+ sku = " Premium"
280+ }
281+
275282diagnostic_settings = {
276283 metric_enabled = true
277284}
@@ -867,7 +874,7 @@ function_apps = {
867874 ]
868875 env_vars_static = {
869876 AcceptableLatencyThresholdMs = " 500"
870- MaxRetryCount= 3
877+ MaxRetryCount = 3
871878 }
872879 }
873880
Original file line number Diff line number Diff line change @@ -615,3 +615,13 @@ variable "function_app_slots" {
615615 function_app_slot_enabled = optional (bool , false )
616616 }))
617617}
618+
619+ variable "container_registry" {
620+ description = " Configuration of the Azure Container Registry used for feature testing"
621+ type = object ({
622+ name_suffix = optional (string , " " )
623+ admin_enabled = optional (bool , false )
624+ uai_name = optional (string , " dtos-cohort-manager-acr-push" )
625+ sku = optional (string , " Premium" )
626+ })
627+ }
You can’t perform that action at this time.
0 commit comments