Azure CLI

Account management defaults

Set subscription by name

subscriptionName="chgeuer-work"
az account set --subscription "${subscriptionName}"

Get subscription ID of current account

subscriptionID="$( az account show --output json | jq -r ".id" )"

Create an ARM deployment and pass in a parameter of type 'object'

The file definition.json contains a JSON object, which is passed as-is into the ARM deployment:

resourceGroup="foo"
logicAppName="someapp"

deploymentResult="$( az group deployment create \
  --resource-group "${resourceGroup}" \
  --mode Incremental \
  --template-file ./azuredeploy-minimal.json \
  --parameters logicAppName="${logicAppName}" \
  --parameters logicAppDefinition="@./definition.json" 
  )"

The template has a corresponding type=object parameter:

Run the Docker container

Last updated