Skip to content

Commit 4cd9ac5

Browse files
Added code to fetch IP
* updated the python version to latest * Changed the python version in all workflows * Added azure identity package to requirements * Changed the authentication type * Changed python version to 3.13 and enabled manual trigger * Changed vnet name * Changed vnet create function * Changed subnets create function * Changed subnet name to subnet list * Fixed subnet name * Changed the deletion of vnet resource group * Added existing VPC condition * Changed the deletion of vnet resource group * Added existing VPC condition * Added code to fetch IP
1 parent 84220ba commit 4cd9ac5

5 files changed

+7
-6
lines changed

.github/workflows/healthcheck-app-existingVnet-Lin-Thurs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ jobs:
3434
- name: MWAS ref Arch Existing Virtual Network Health check test on linux in Japan East.
3535
run: |
3636
cd healthcheck
37-
python healthcheck_webapps_refarch.py ${{ secrets.TenantId }} ${{ secrets.ClientId }} ${{ secrets.ClientSecret }} ${{ secrets.SubscriptionId }} ${{ secrets.username }} ${{ secrets.password }} ${{ secrets.ipaddress }} ${{ secrets.sslcertificate }} ${{ secrets.sslkey }} "japaneast" "Linux" "true"
37+
python healthcheck_webapps_refarch.py ${{ secrets.TenantId }} ${{ secrets.ClientId }} ${{ secrets.ClientSecret }} ${{ secrets.SubscriptionId }} ${{ secrets.username }} ${{ secrets.password }} ${{ secrets.sslcertificate }} ${{ secrets.sslkey }} "japaneast" "Linux" "true"
3838

.github/workflows/healthcheck-app-existingVnet-Win-Tue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ jobs:
3434
- name: MWAS ref Arch Existing Virtual Network Health check test on Windows in West Eu
3535
run: |
3636
cd healthcheck
37-
python healthcheck_webapps_refarch.py ${{ secrets.TenantId }} ${{ secrets.ClientId }} ${{ secrets.ClientSecret }} ${{ secrets.SubscriptionId }} ${{ secrets.username }} ${{ secrets.password }} ${{ secrets.ipaddress }} ${{ secrets.sslcertificate }} ${{ secrets.sslkey }} "westeurope" "Windows" "true"
37+
python healthcheck_webapps_refarch.py ${{ secrets.TenantId }} ${{ secrets.ClientId }} ${{ secrets.ClientSecret }} ${{ secrets.SubscriptionId }} ${{ secrets.username }} ${{ secrets.password }} ${{ secrets.sslcertificate }} ${{ secrets.sslkey }} "westeurope" "Windows" "true"
3838

.github/workflows/healthcheck-app-newVnet-Lin-Wed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ jobs:
3333
- name: Web App ref Arch New Virtual Network Health check test on Linux in West US
3434
run: |
3535
cd healthcheck
36-
python healthcheck_webapps_refarch.py ${{ secrets.TenantId }} ${{ secrets.ClientId }} ${{ secrets.ClientSecret }} ${{ secrets.SubscriptionId }} ${{ secrets.username }} ${{ secrets.password }} ${{ secrets.ipaddress }} ${{ secrets.sslcertificate }} ${{ secrets.sslkey }} "westus" "Linux" "false"
36+
python healthcheck_webapps_refarch.py ${{ secrets.TenantId }} ${{ secrets.ClientId }} ${{ secrets.ClientSecret }} ${{ secrets.SubscriptionId }} ${{ secrets.username }} ${{ secrets.password }} ${{ secrets.sslcertificate }} ${{ secrets.sslkey }} "westus" "Linux" "false"
3737

.github/workflows/healthcheck-app-newVnet-Win-Mon.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ jobs:
3535
- name: Web App ref Arch New Virtual Network Health check test on Windows in East US region
3636
run: |
3737
cd healthcheck
38-
python healthcheck_webapps_refarch.py ${{ secrets.TenantId }} ${{ secrets.ClientId }} ${{ secrets.ClientSecret }} ${{ secrets.SubscriptionId }} ${{ secrets.username }} ${{ secrets.password }} ${{ secrets.ipaddress }} ${{ secrets.sslcertificate }} ${{ secrets.sslkey }} "eastus" "Windows" "false"
38+
python healthcheck_webapps_refarch.py ${{ secrets.TenantId }} ${{ secrets.ClientId }} ${{ secrets.ClientSecret }} ${{ secrets.SubscriptionId }} ${{ secrets.username }} ${{ secrets.password }} ${{ secrets.sslcertificate }} ${{ secrets.sslkey }} "eastus" "Windows" "false"
3939

healthcheck/healthcheck_webapps_refarch.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from azure.mgmt.network import NetworkManagementClient
1414
from azure.mgmt.network.models import ServiceEndpointPropertiesFormat, Subnet
1515

16-
def main(tenant_id_arg, client_id_arg, client_secret_arg, subscription_id_arg, username, password, ipAddress, sslCertificate, sslPrivateKey, location_arg, platform_arg, existingVPC):
16+
def main(tenant_id_arg, client_id_arg, client_secret_arg, subscription_id_arg, username, password, sslCertificate, sslPrivateKey, location_arg, platform_arg, existingVPC):
1717

1818
# Deploy template
1919
# Reference architecture in production.
@@ -26,6 +26,7 @@ def main(tenant_id_arg, client_id_arg, client_secret_arg, subscription_id_arg, u
2626
credentials = AzureAuth.authenticate_client_key(tenant_id, client_id, client_secret)
2727
subscription_id = subscription_id_arg
2828
location = location_arg
29+
ipAddress = requests.get("https://api.ipify.org").text + "/32"
2930

3031
if existingVPC=='true':
3132
# Subnets & virtual network info
@@ -131,4 +132,4 @@ def main(tenant_id_arg, client_id_arg, client_secret_arg, subscription_id_arg, u
131132
print("Deleted the deployment which contains the virtual network:-", ct)
132133

133134
if __name__ == '__main__':
134-
main(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7], sys.argv[8], sys.argv[9], sys.argv[10], sys.argv[11], sys.argv[12])
135+
main(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7], sys.argv[8], sys.argv[9], sys.argv[10], sys.argv[11])

0 commit comments

Comments
 (0)