@@ -3,6 +3,7 @@ data "azurerm_client_config" "current" {}
33locals {
44 is_us_gov = startswith (lower (var. resource_group . location ), " usgov" )
55 aad_endpoint = local. is_us_gov ? " https://login.microsoftonline.us" : " https://login.microsoftonline.com"
6+ container_types = toset ([" scheduled" , " adhoc" ])
67}
78
89resource "azurerm_user_assigned_identity" "container_mi" {
@@ -33,7 +34,7 @@ resource "azurerm_key_vault_access_policy" "mi_kv_access" {
3334# If "Private", a port must be opened on the container. This is dictated by Azure's APIs
3435# The open port is still within the vnet, so nothing is exposed externally
3536resource "azurerm_container_group" "aci" {
36- for_each = toset ([ " scheduled " , " adhoc " ])
37+ for_each = local . container_types
3738 name = " ${ var . resource_prefix } -${ each . key } -container"
3839 location = var. resource_group . location
3940 resource_group_name = var. resource_group . name
@@ -74,7 +75,7 @@ resource "azurerm_container_group" "aci" {
7475 " TENANT_ID" = data.azurerm_client_config.current.tenant_id
7576 " APP_ID" = var.application_client_id
7677 " REPORT_OUTPUT" = local.output_storage_container_url
77- " TENANT_INPUT" = local.input_storage_container_url
78+ " TENANT_INPUT" = " ${ local . input_storage_container_url } / ${ each . key } "
7879 " IS_VNET" = var.subnet_ids != null
7980 " IS_GOV" = local.is_us_gov
8081 " VAULT_NAME" = var.cert_info.vault_name
0 commit comments