-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started Check NamePrefix availability
CARMLPipelinePrincipal edited this page Apr 12, 2022
·
2 revisions
The 'Test-NamePrefixAvailability' function provides you with the capability to test if the namePrefix, specified in the settings.json file, conflicts with any existing resource.
You can find the script under utilities/tools/Test-NamePrefixAvailability.ps1
When invoked, the script
- Fetches all parameter files for modules that require unique names. For example
'Microsoft.Storage/storageAccounts''Microsoft.ContainerRegistry/registries''Microsoft.KeyVault/vaults'
- Replace any tokens contained in the parameter files with the key-value pairs provided in the
Tokensinput parameter - Search for each resource resource type if the final name would be taken
- Return the result for each resource alongside a final recommendation to use / not use the chosen
'namePrefix'
Note: You'll need to have an active Azure login. If not connected, you can do so via the
Connect-AzAzccountcmdlet (from theAz.ResourcesPowerShell module). Note: The script must be loaded before the function can be invoked
For details on how to use the function please refer to the script's local documentation.