1

Is it possible to download the deployment JSON file (the template) for an Azure resource using Azure CLI? The equivalent in PowerShell seems to be this command. https://docs.microsoft.com/en-us/powershell/module/az.resources/save-azdeploymenttemplate?view=azps-2.0.0

In this case, the resource is a Cloud Service.

Dillon Brown
  • 178
  • 1
  • 7

1 Answers1

1

It looks like az group deployment export is the command to do this.

az group deployment export --name
                           --resource-group
                           [--subscription]

https://docs.microsoft.com/en-us/cli/azure/group/deployment?view=azure-cli-latest#az-group-deployment-export

I'm not sure what the best way to save that output to a file is, but it looks like you can redirect to files using > on Bash command lines.

Dillon Brown
  • 178
  • 1
  • 7