Skip to content

Commit cb2d878

Browse files
committed
Added existing VPC condition
1 parent d87fee5 commit cb2d878

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

healthcheck/healthcheck_webapps_refarch.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,12 @@ def main(tenant_id_arg, client_id_arg, client_secret_arg, subscription_id_arg, u
123123
deployment_deletion = DeployOp.delete_resourcegroup(credentials, subscription_id, resource_group_name)
124124
ct = datetime.datetime.now()
125125
print("Date time after deployment and deletion of stack:-", ct)
126-
# Delete deployment with virtual network
127-
DeployOp.delete_resourcegroup(credentials, subscription_id, resource_name_vnet)
128-
ct = datetime.datetime.now()
129-
print("Deleted the deployment which contains the virtual network:-", ct)
126+
127+
if existingVPC=='true':
128+
# Delete deployment with virtual network
129+
DeployOp.delete_resourcegroup(credentials, subscription_id, resource_name_vnet)
130+
ct = datetime.datetime.now()
131+
print("Deleted the deployment which contains the virtual network:-", ct)
130132

131133
if existingVPC=='true':
132134
# Delete deployment with virtual network

0 commit comments

Comments
 (0)