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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.