You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 17, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+50-26Lines changed: 50 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,35 +39,57 @@ network interface belonging to the subnet. The virtual machine is a `Standard_D1
39
39
40
40
### To run this sample, do the following:
41
41
42
-
You will need to create an Azure service principal either through Azure CLI, PowerShell or the portal. You should gather
43
-
the Tenant Id, Client Id and Client Secret from creating the Service Principal for use below.
44
-
45
-
We recommend using a [virtual environment](https://docs.python.org/3/tutorial/venv.html) to run this example, but it's not mandatory.
46
-
To initialize a virtual environment:
47
-
48
-
-`pip install virtualenv`
49
-
-`virtualenv mytestenv`
50
-
-`cd mytestenv`
51
-
-`source bin/activate`
52
-
53
-
Once in your virtual environment:
54
-
-[Create a Service Principal](https://azure.microsoft.com/en-us/documentation/articles/resource-group-authenticate-service-principal/#authenticate-with-password---azure-cli)
1. Create environment variables with the necessary IDs for Azure authentication.
68
+
You can learn where to find the first three IDs in the Azure portal in [this document](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal#get-application-id-and-authentication-key).
69
+
The subscription ID is in the subscription's overview in the "Subscriptions" blade of the portal.
The entry point for this sample is [azure_deployment.py](https://github.com/azure-samples/resource-manager-python-template-deployment/blob/master/azure_deployment.py). This script uses the deployer class
65
-
below to deploy a the aforementioned template to the subscription and resource group specified in `my_resource_group`
86
+
The entry point for this sample is [azure_deployment.py](https://github.com/azure-samples/resource-manager-python-template-deployment/blob/master/azure_deployment.py). This script uses the `Deployer` class
87
+
below to deploy the aforementioned template to the subscription and resource group specified in `my_resource_group`
66
88
and `my_subscription_id` respectively. By default the script will use the ssh public key from your default ssh
67
89
location.
68
90
69
-
*Note: you must set each of the below environment variables (AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET) prior to
70
-
running the script.*
91
+
*Note: you must set each of the environment variables (`AZURE_TENANT_ID`, `AZURE_CLIENT_ID` and `AZURE_CLIENT_SECRET`) prior to
92
+
running the script, and either set `AZURE_SUBSCRIPTION_ID` or replace it in the script. See the numbered list above for instructions on how to do this.*
0 commit comments