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
Bicep resources sometimes effectively have 2 "Name"s.
The first (which is Name in the internal API) is the actual Bicep Resource Name, ie.
\/ This
resource test 'Test/test@2023-01-01' = {
The second, which almost has a convention of AccountName for the existing few resources is the actual name of the resource, example in Cosmos DB:
resource cosmosDbAccount 'Microsoft.DocumentDB/databaseAccounts@2023-11-15' = {
name: 'cosmos${uniqueString(resourceGroup().id)}'
^ This
To avoid the ambiguity of Name being used for both there are a couple of options neither of which I'm sure is really better than the other:
Remove the concept of the Resource Name as being customisable, so we would always "auto generate" a unique (but constant) string, which could be based off the "Account Name". This has the upside of removing any ambiguity as it becomes internal, but the downside of making Bicep (if synthed) more unreadable / usable outside of tooling.
Standardise Name as ResourceName that can be overridden and used internally, leaving Name to be used when required by the resource definition itself.
Either of those work to remove the less defined Name property used for Bicep and reduce confusion when implementing new resources.
The text was updated successfully, but these errors were encountered:
Bicep resources sometimes effectively have 2 "Name"s.
The first (which is
Name
in the internal API) is the actual Bicep Resource Name, ie.The second, which almost has a convention of
AccountName
for the existing few resources is the actual name of the resource, example in Cosmos DB:To avoid the ambiguity of
Name
being used for both there are a couple of options neither of which I'm sure is really better than the other:synth
ed) more unreadable / usable outside of tooling.Name
asResourceName
that can be overridden and used internally, leavingName
to be used when required by the resource definition itself.Either of those work to remove the less defined
Name
property used for Bicep and reduce confusion when implementing new resources.The text was updated successfully, but these errors were encountered: