You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So that users make conscious decisions about how things are named.
Description
As part of creating uniqueness, update mlz.bicep to require the mandatory input of the resourcePrefix parameter.
Today, the deployment().name property is used today to seed resource names and uniqueness for resources that require global uniqueness. This property is relative to the ARM deployment and not relative to anything Mission Landing Zone or any parameter value the user has provided.
The direction the team has decided in #549 is to start deriving resource names and uniqueness from a user-supplied value instead.
@description('A name (3-24 alphanumeric characters in length without whitespace) used to prefix resources and generate uniqueness for resources with globally unique naming requirements like Storage Accounts and Log Analytics Workspaces')
paramresourcePrefixstring = 'mlz-${uniqueId}'
And then resourcePrefix is used for resource names:
Instead, take resourcePrefix as a required parameter. Then, use the user-supplied resourcePrefix plus some other uniqueish seed like UtcNow or a GUID to generate uniqueness where it's required.
Acceptance Criteria
resourcePrefix is a parameter without a default
deployment().name is not used as a seed for resource names
deployment().name is not used as a seed for uniqueness
resourcePrefix + some uniqueish seed generates uniqueness
The text was updated successfully, but these errors were encountered:
glennmusa
changed the title
Require a user-supplied value for resourcePrefix
Require a user-supplied value for resourcePrefix and do not use deployment().name for seeding names
Dec 3, 2021
Benefit/Result/Outcome
So that users make conscious decisions about how things are named.
Description
As part of creating uniqueness, update
mlz.bicep
to require the mandatory input of theresourcePrefix
parameter.Today, the
deployment().name
property is used today to seed resource names and uniqueness for resources that require global uniqueness. This property is relative to the ARM deployment and not relative to anything Mission Landing Zone or any parameter value the user has provided.The direction the team has decided in #549 is to start deriving resource names and uniqueness from a user-supplied value instead.
This is where a
uniqueId
is seeded:missionlz/src/bicep/mlz.bicep
Line 529 in 1f1b126
Then it is used to determine the
resourcePrefix
:missionlz/src/bicep/mlz.bicep
Lines 304 to 307 in 1f1b126
And then
resourcePrefix
is used for resource names:missionlz/src/bicep/mlz.bicep
Line 319 in 1f1b126
And also used for generating uniqueness:
missionlz/src/bicep/mlz.bicep
Line 345 in 1f1b126
Instead, take
resourcePrefix
as a required parameter. Then, use the user-suppliedresourcePrefix
plus some other uniqueish seed like UtcNow or a GUID to generate uniqueness where it's required.Acceptance Criteria
resourcePrefix
is a parameter without a defaultdeployment().name
is not used as a seed for resource namesdeployment().name
is not used as a seed for uniquenessresourcePrefix
+ some uniqueish seed generates uniquenessThe text was updated successfully, but these errors were encountered: