GithubHelp home page GithubHelp logo

bkalyvas / psarmtools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from timothywarner/psarmtools

0.0 1.0 0.0 598 KB

PowerShell function to generate an Azure Resource Manager naming convention in accordance with best practices and and naming limitations.

License: MIT License

PowerShell 100.00%

psarmtools's Introduction

Welcome to the Azure Resource Manager Toolkit!

Here you will find a collection of PowerShell modules designed to make your life working with ARM a bit easier.

Please feel free to submit fixes and enhancements via the GitHub pull request system. You can reach me directly at [email protected]. Thanks for stopping by!

New-ARMNamingConvention

This PowerShell function generates an Azure Resource Manager naming convention in accordance with best practices and and naming limitations.

Usage

The function has two mandatory parameters:

  • Project: Your project ID must begin with a letter and contain no more than four characters
  • Environment: You can specify Development, Staging, Testing, or Production

Here's an example showing partial output:

PS C:\>New-ARMNamingConvention -Project 'plur' -Environment 'Development'

Name DisplayName       Type Value          
    
rg   Resource Group    PaaS plur-8F-rg-dev 
vm   Virtual Machine   IaaS plur-8F-vm-dev 
st   Storage Account   IaaS plur8fstdev   

In the above output, the 8F represents a two-digit hexadecimal identifier. As you know, some Azure resources need to be globally unique, so this method attempts to make that easier for you.

Notice the storage account's format; this defers to the (frustrating) limitations of lowercase, alphanumeric storage account names with no intervening hyphens or underscores.

You are limited to a maximum of four characters for your project name. Azure has a 15-character requirement for virtual machine names, so I applied that 15-character maximum to all these proposed resource names. Better safe than sorry!

TODO

  • Finish comment-based help
  • Include additional Azure resources
  • Organize the IaaS and PaaS categories
  • Incorporate Pester tests
  • Add functionality to the output object

Credit

Special thanks to the following friends and fellow PowerShell community members for their help:

  • Jeff Hicks (@jeffhicks) - I couldn't have done this without you :)
  • Mike F. Robbins (@mikefrobbins) - Your code is my main reference material
  • Adam Bertram (@adbertram) - Your Pluralsight courses are fantastic

psarmtools's People

Contributors

timothywarner avatar devblackops avatar

Watchers

James Cloos 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.