Skip to content

Instantly share code, notes, and snippets.

@atrakic
Last active May 14, 2024 09:28
Show Gist options
  • Save atrakic/315a0cb307718d83a86283a47b7c47e4 to your computer and use it in GitHub Desktop.
Save atrakic/315a0cb307718d83a86283a47b7c47e4 to your computer and use it in GitHub Desktop.
trigger:
tags:
include:
- '*'
branches:
include:
- '*'
pool:
vmImage: ubuntu-latest
variables:
- name: rgname
value: rgadtrdeployedfrompipeline
steps:
- script: echo 'Hello world'
- task: AzureCLI@2
displayName: 'Create resource group'
inputs:
azureSubscription: mytestconnection
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
az --version
az account show
az group create --name $(rgName) --location germanywestcentral
- task: AzureCLI@2
displayName: 'Create Storage account'
inputs:
azureSubscription: mytestconnection
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
az deployment group create \
--name ExampleDeployment \
--resource-group $(rgName) \
--template-uri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.storage/storage-account-create/azuredeploy.json" \
--parameters storageAccountType=Standard_GRS

  • Azure
  • Storage account
  • Web app (deployment slots)
  • Function apps
  • Service bus(queues/topics) C#
  • Private endpoints (vnet)
  • Managed identities
  • DevOps

  • User vs system ManagedIdenteties
  • Many-none | 1-1

To deploy an external template, use the template-uri parameter

https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/azure-resource-manager/templates/deploy-cli.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment