Skip to content

Commit 813309e

Browse files
authored
Update healthcheck_webapps_refarch.py
1 parent 44f90b9 commit 813309e

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

healthcheck/healthcheck_webapps_refarch.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,19 @@ def main(tenant_id_arg, client_id_arg, client_secret_arg, subscription_id_arg, u
4343
vnet_cidr)
4444
network_client = NetworkManagementClient(credentials, subscription_id)
4545
# Add service endpoint to subnets
46-
for subnet_name in subnet_names:
47-
subnet = network_client.subnets.get(resource_name_vnet, vnet_name, subnet_name)
48-
if not subnet.service_endpoints:
49-
subnet.service_endpoints = []
50-
subnet.service_endpoints.append(
51-
ServiceEndpointPropertiesFormat(service='Microsoft.Storage')
52-
)
53-
updated_subnet = network_client.subnets.create_or_update(
54-
resource_name_vnet,
55-
vnet_name,
56-
subnet_name,
57-
subnet
58-
).result()
59-
print(f"Enabled Microsoft.Storage service endpoint for subnet: {subnet_name}")
46+
subnet = network_client.subnets.get(resource_name_vnet, vnet_name, subnet_name)
47+
if not subnet.service_endpoints:
48+
subnet.service_endpoints = []
49+
subnet.service_endpoints.append(
50+
ServiceEndpointPropertiesFormat(service='Microsoft.Storage')
51+
)
52+
updated_subnet = network_client.subnets.create_or_update(
53+
resource_name_vnet,
54+
vnet_name,
55+
subnet_name,
56+
subnet
57+
).result()
58+
print(f"Enabled Microsoft.Storage service endpoint for subnet: {subnet_name}")
6059
except Exception as e:
6160
raise(e)
6261
print(subnet_name[0])

0 commit comments

Comments
 (0)