Giter Site home page Giter Site logo

azurerm-samples's Introduction

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 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)
  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:

.\Deploy-AzTemplate.ps1 -ArtifactsStagingDirectory '[foldername]' -Location 'eastus'
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.

azurerm-samples's People

Contributors

bmoore-msft avatar halter73 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azurerm-samples's Issues

AzureDeploy template fails because SAS is a secure string

I'd been getting 404 errors when the WebAppWebDeploy/AzureDeploy template tried to access the packageUri. After some trial-and-error, I discovered that it works fine as long as the following line in Deploy-AzureResourceGroup.ps1 is commented/removed:

$ArtifactsLocationSasToken = ConvertTo-SecureString $ArtifactsLocationSasToken -AsPlainText -Force

I tried using the template function string() to wrap the _parameters('artifactsLocationSasToken') reference, but that didn't seem to work.

Lastly, since the -Permission Container switch is used on New-AzureStorageContainer, why generate a SAS token at all. FWIW, I just changed the switch value to Off.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.