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!
This PowerShell function generates an Azure Resource Manager naming convention in accordance with best practices and and naming limitations.
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!
- Finish comment-based help
- Include additional Azure resources
- Organize the IaaS and PaaS categories
- Incorporate Pester tests
- Add functionality to the output object
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