Azure Resource Manager - krzysiek861/AvanadeWorkshop GitHub Wiki

Checkout branch

git checkout feature/web-app

This is a starter branch for the workshop.

Deployment

Open azuredeploy.parameters.json file and edit line 6. Set some custom value of the parameter avanadeAppEnvironment. The parameter should be at least 3 characters and maximum 5 characters long. It should contain only alphanumeric characters. The value should be unique among learners, perhaps you can use your nickname.

Code

Open PowerShell window from the following directory:

\AvanadeWorkshop\src\Avanade.AzureWorkshop.ResourceGroup.

Type:

az login

Provide your credentials and continue.

Check if you have more than one subscription:

az account list --output table

List of subscriptions

If so, then select one you wish to use:

az account set --subscription <subscription_id>

Accept Azure Marketplace image terms to use Twilio Sendgrid:

az vm image terms accept --publisher "sendgrid" --plan "free-100" --offer "tsg-saas-offer"

Run template deployment:

.\deploy.ps1 -ResourceGroupLocation "westeurope" -UploadArtifacts

The script should run and new resource groups should be created. One contains script files, the other one resources.

Once deployment is finished, review all the resources in the Azure Portal.

Go to the KeyVault resource and save it's URL to use in the next section.

Obstacles

In case of Powershell execution policy error, allow untrusted script to be run:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

In case you created the whole resource group and deleted, the key vault may stay in deleted stayed. Then you have to purge it: az keyvault list-deleted az keyvault purge --name xyz-avanade-workshop-kv

You can also manage deleted key vaults through the azure portal