Skip to content

New ArmResourceGroupName

Miguel Bernard edited this page Sep 27, 2019 · 2 revisions

New-ArmResourceGroupName creates a new name that could be use for Resource Groups

Default naming convention is {projectname}{delimiter}{environmentcode}{delimiter}{context}{delimiter}{location} i.e. posharmdeployement-prod-admin-eastus

By default all parts are loaded from the configuration files. If a part is specified on New-ArmResourceGroupName it will override that part.

Examples

# Simple
New-ArmResourceGroupName -ProjectName "posharmdeployement" -EnvironmentCode "prod" -Context "admin" -Location "eastus"
# result: posharmdeployement-prod-admin-eastus


# Custom naming convention
New-ArmResourceGroupName -NamingConvention "this{delimiter}is{delimiter}project{delimiter}{projectname}" -ProjectName "posharmdeployement"
# result: this-is-project-posharmdeployement

# Custom delimiter
New-ArmResourceGroupName -Delimiter "*" -ProjectName "posharmdeployement" -EnvironmentCode "prod" -Context "admin" -Location "eastus"
# result: posharmdeployement*prod*admin*eastus

Clone this wiki locally