Azure CLI

Account management defaults

Set subscription by name

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:


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:

  "$schema": "",
  "contentVersion": "",
  "parameters": {
    "logicAppName": { "type": "string", "defaultValue": "..." },
    "logicAppDefinition": { "type": "object" }

Run the Docker container

docker pull

docker run --mount "src=${HOME}/.azure,target=/root/.azure,type=bind" -it --rm

Last updated