Declaring user-defined data type differences/usage #14054
-
What's the difference between:
i.e.
vs
In my testing, I've noticed no difference in outcome so I suspect it's just a personal preference but I just wanted to be sure. I've also noticed that MS seem to prefer the first syntax which to me, I can't immediately tell if a param is an array or an object—instead, I have to first find the type definition. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @kamfaima, there is no (technical) difference between those two examples. It's just a syntactic difference... If we take a look at Azure Verified Modules (AVM - Key Vault) you also see this, but the focus is more on the name of the parameter. For example, in AVM a type that is an array is written in plural (e.g. So it depends on your own Bicep code convention how to deal with this. Both options are fine though! |
Beta Was this translation helpful? Give feedback.
Hi @kamfaima, there is no (technical) difference between those two examples. It's just a syntactic difference...
If we take a look at Azure Verified Modules (AVM - Key Vault) you also see this, but the focus is more on the name of the parameter. For example, in AVM a type that is an array is written in plural (e.g.
accessPolicies
orsecrets
) and other types such as string, int, bool are written in singular (e.g.enableRbacAuthorization
orname
).So it depends on your own Bicep code convention how to deal with this. Both options are fine though!