Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bmoore-msft/azurerm-samples

Azure Resource Manager Sample Template Concepts
https://github.com/bmoore-msft/azurerm-samples

Last synced: about 21 hours ago
JSON representation

Azure Resource Manager Sample Template Concepts

Awesome Lists containing this project

README

        

# Azure Resource Manager Samples

This repo has a handful of scenario based samples for using Azure Resource Manager Templates. Also included are scripts that will deploy the template *and* any related artifacts (configuration scripts, nested templates) required for the template deployment.

These scripts are the same scripts used in the [Azure QuickStart repo](https://github.com/Azure/azure-quickstart-templates) and the Azure SDK in Visual Studio (VS scripts are probably older) and follow the same best practices for parameterizing templates for staged artifacts.

The scripts will deploy a resource group or subscription scoped template using the appropriate schema.

So the script has 2 parts:

1) Uploading artifacts to storage and providing parameter values in the template for the artifacts' location and sasToken (more on this [below](#deployment-artifacts))
2) Creating the resource group (in a Resource Group Scoped Deployment) and deploying the template.

Just run the script and point the script to the folder for the sample you want to deploy. For example:

```PowerShell
.\Deploy-AzTemplate.ps1 -ArtifactsStagingDirectory '[foldername]' -Location 'eastus'
```

```bash
azure-group-deploy.sh -a [foldername] -l eastus
```

These scripts are also used in CI/CD pipelines just as they are on the command line which helps stream line the dev/test lifecycle.

## Deployment Artifacts

The artifacts for a sample are copied to an Azure storage account and parameters are used for the uri's and sasToken. Special parameter names are used by each template (_artifactsLocation and _artifactsLocationSasToken) to indicate which parameter values will be set by the script. While these scripts and templates are designed to work together, it is not required. The templates will work just as well in other workflows, but those workflows would be required to stage or upload the artifacts and set the appropriate parameter values.