From 4d35aeecb4602ed0c9b3150cc388acda4dcb2e15 Mon Sep 17 00:00:00 2001 From: Ahmed Youssef Date: Wed, 19 Jun 2024 10:32:03 +1000 Subject: [PATCH] Fix PSRule Tests for ACR --- src/infrastructure/acr/main.bicep | 32 ++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/infrastructure/acr/main.bicep b/src/infrastructure/acr/main.bicep index 002ffb5..130ca3f 100644 --- a/src/infrastructure/acr/main.bicep +++ b/src/infrastructure/acr/main.bicep @@ -16,19 +16,25 @@ resource acrResource 'Microsoft.ContainerRegistry/registries@2021-06-01-preview' } properties: { adminUserEnabled: true - policies: acrSku == 'Premium' ? { - quarantinePolicy: { - status: 'enabled' - } - trustPolicy: { - status: 'enabled' - type: 'Notary' - } - retentionPolicy: { - status: 'enabled' - days: 30 - } - } : {} + publicNetworkAccess: 'Disabled' + networkRuleSet: { + defaultAction: 'Deny' + } + policies: acrSku == 'Premium' + ? { + quarantinePolicy: { + status: 'enabled' + } + trustPolicy: { + status: 'enabled' + type: 'Notary' + } + retentionPolicy: { + status: 'enabled' + days: 30 + } + } + : {} } }