Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/bmoore-msft/azurerm-samples
- Owner: bmoore-msft
- Created: 2016-01-04T16:40:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-11-03T17:32:00.000Z (about 2 years ago)
- Last Synced: 2023-03-09T23:10:58.474Z (over 1 year ago)
- Language: PowerShell
- Homepage:
- Size: 5.72 MB
- Stars: 48
- Watchers: 9
- Forks: 24
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
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.