From 419ca9ca1e35d63bf9a86f5abb1884b073433b39 Mon Sep 17 00:00:00 2001 From: Gerd Oberlechner Date: Tue, 10 Dec 2024 19:42:48 +0100 Subject: [PATCH] place ACR tasks into explicit region (#957) Signed-off-by: Gerd Oberlechner --- dev-infrastructure/configurations/acr-ocp.tmpl.bicepparam | 2 ++ dev-infrastructure/configurations/acr-svc.tmpl.bicepparam | 2 ++ dev-infrastructure/templates/dev-acr.bicep | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dev-infrastructure/configurations/acr-ocp.tmpl.bicepparam b/dev-infrastructure/configurations/acr-ocp.tmpl.bicepparam index b250ce0bb..0d9dc4616 100644 --- a/dev-infrastructure/configurations/acr-ocp.tmpl.bicepparam +++ b/dev-infrastructure/configurations/acr-ocp.tmpl.bicepparam @@ -22,3 +22,5 @@ param purgeJobs = [ ] param keyVaultName = '{{ .serviceKeyVault.name }}' + +param location = '{{ .global.region }}' diff --git a/dev-infrastructure/configurations/acr-svc.tmpl.bicepparam b/dev-infrastructure/configurations/acr-svc.tmpl.bicepparam index 24e8dc413..5d43eccfd 100644 --- a/dev-infrastructure/configurations/acr-svc.tmpl.bicepparam +++ b/dev-infrastructure/configurations/acr-svc.tmpl.bicepparam @@ -35,3 +35,5 @@ param purgeJobs = [ ] param keyVaultName = '{{ .serviceKeyVault.name }}' + +param location = '{{ .global.region }}' diff --git a/dev-infrastructure/templates/dev-acr.bicep b/dev-infrastructure/templates/dev-acr.bicep index 2bcb61b6b..f505e8751 100644 --- a/dev-infrastructure/templates/dev-acr.bicep +++ b/dev-infrastructure/templates/dev-acr.bicep @@ -18,6 +18,8 @@ param purgeJobs array = [] @description('Name of the global key vault.') param keyVaultName string = '' +param location string = resourceGroup().location + resource keyVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = { name: keyVaultName } @@ -76,7 +78,7 @@ resource secretAccessPermission 'Microsoft.Authorization/roleAssignments@2022-04 resource purgeCached 'Microsoft.ContainerRegistry/registries/tasks@2019-04-01' = [ for purgeJob in purgeJobs: { name: '${purgeJob.name}' - location: resourceGroup().location + location: location parent: acrResource properties: { agentConfiguration: {