Code Monkey home page Code Monkey logo

azurearmtemplatehelper-powershellmodule's Introduction

AzureArmTemplateHelper PowerShell Module

This is PowerShell module that help for Azure ARM template making. This module contains two cmdlets.

  • Set-AzureArmTemplateFile cmdlet
  • Get-AzureArmTemplateDeployUri cmdlet

Install

This module available on the PowerShell Gallery page. You can install use the Install-Module cmdlet.

PS > Install-Module -Name AzureArmTemplateHelper 

Set-AzureArmTemplateFile cmdlet

This cmdlet helping to ARM template making by upload the ARM template files on local filesystem to blob storage of Azure storage. When you making linked ARM template, this cmdlet is especially helpful.

Parameters

Parameter Name Description
LocalBasePath The path of the folder on local filesystem that contains the ARM templates.
StorageAccountName The storage account name to upload the ARM templates.
ResourceGroupName The resource group name that it contains the storage account of StorageAccountName parameter.
StorageAccountKey The storage account key for storage account of StorageAccountName parameter.
ContainerName The container name to upload the ARM templates. This parameter is optional. Default container name is 'armtemplate'.
Force This switch parameter is optional. If you use this switch, overwrite the existing ARM templates in the container.

Examples

Example 1

This example is upload the ARM template files from under 'C:\TemplateWork' folder with recursive. You need execute Login-AzureRmAccount cmdlet before execute this cmdlet because this example use ResourceGroupName parameter.

PS > Set-AzureArmTemplateFile -LocalBasePath 'C:\TemplateWork' -StorageAccountName 'abcd1234' -ResourceGroupName 'ArmTemplateDev-RG' -Force

Example 2

This example is upload the ARM template files from under 'C:\TemplateWork' folder with recursive.

PS > Set-AzureArmTemplateFile -LocalBasePath 'C:\TemplateWork' -StorageAccountName 'abcd1234' -StorageAccountKey 'dWLe7OT3P0HevzLeKzRlk4j4eRws7jHStp0C4XJtQJhuH4p5EOP+vLcK1w8sZ3QscGLy50DnOzQoiUbpzXD9Jg==' -Force

Get-AzureArmTemplateDeployUri cmdlet

This cmdlet building the URL that is access to custom deployment blade on Azure Portal. The URL allows deployment of your ARM template via Azure Portal.

Parameter Name Description
TemplateUri The URI of your ARM template.
ShowDeployBlade This switch parameter is optional. If you use this switch, this cmdlet open the URL by your browser.

Examples

Example 1

This example is build the URL of custom deployment blade from your ARM template URL.

PS > Get-AzureArmTemplateDeployUri -TemplateUri 'https://abcd1234.blob.core.windows.net/armtemplate/main.json'

Uri
---
https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fabcd1234.blob.core.windows.net%2Farmtemplate%2Fmain.json

Example 2

This example is build the URL of custom deployment blade from your ARM template URL and open that URL by your browser.

PS > Get-AzureArmTemplateDeployUri -TemplateUri 'https://abcd1234.blob.core.windows.net/armtemplate/main.json' -ShowDeployBlade

Release Notes

  • Updated GitHub URL.
  • Added ResourceGroupName parameter set to Set-AzureArmTemplateFile cmdlet.
  • Improved progress messages.
  • Improved parameter validations.
  • Updated helps.
  • Updated PowerShell Gallery metadata.
  • Some fixes.
  • Added help for cmdlets.
  • Initial release.

License

Copyright (c) 2017-present Takeshi Katano. All rights reserved. This software is released under the MIT License.

Disclaimer: The codes stored herein are my own personal codes and do not related my employer's any way.

azurearmtemplatehelper-powershellmodule's People

Contributors

tksh164 avatar

Watchers

 avatar  avatar  avatar  avatar

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.