From 60158d594df00344a58f07b8376787acfffec164 Mon Sep 17 00:00:00 2001 From: Jim Madge Date: Thu, 31 Oct 2024 12:03:22 +0000 Subject: [PATCH] Use default action --- .../components/wrapped/nfsv3_storage_account.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data_safe_haven/infrastructure/components/wrapped/nfsv3_storage_account.py b/data_safe_haven/infrastructure/components/wrapped/nfsv3_storage_account.py index 873a44c949..61b0db634c 100644 --- a/data_safe_haven/infrastructure/components/wrapped/nfsv3_storage_account.py +++ b/data_safe_haven/infrastructure/components/wrapped/nfsv3_storage_account.py @@ -34,10 +34,10 @@ def __init__( tags: Input[Mapping[str, Input[str]]], ): if allowed_service_tag == AzureServiceTag.INTERNET: - public_network_access = storage.PublicNetworkAccess.ENABLED + default_action = storage.DefaultAction.ALLOW, ip_rules = None else: - public_network_access = storage.PublicNetworkAccess.DISABLED + default_action = storage.DefaultAction.DENY, ip_rules = Output.from_input(allowed_ip_addresses).apply( lambda ip_ranges: [ storage.IPRuleArgs( @@ -63,7 +63,7 @@ def __init__( minimum_tls_version=storage.MinimumTlsVersion.TLS1_2, network_rule_set=storage.NetworkRuleSetArgs( bypass=storage.Bypass.AZURE_SERVICES, - default_action=storage.DefaultAction.DENY, + default_action=default_action, ip_rules=ip_rules, virtual_network_rules=[ storage.VirtualNetworkRuleArgs( @@ -71,7 +71,7 @@ def __init__( ) ], ), - public_network_access=public_network_access, + public_network_access=storage.PublicNetworkAccess.ENABLED, resource_group_name=resource_group_name, sku=storage.SkuArgs(name=storage.SkuName.PREMIUM_ZRS), opts=opts,