Add logical<->physical zone mapping functions to Bicep#11660
Add logical<->physical zone mapping functions to Bicep#11660
Conversation
There was a problem hiding this comment.
Can the result of this function be known at compile time (like toLower('FOO')), or is this something that can only be decided at deploy time (like resourceGroup())?
If this function is decidable at compile time, you can use .WithReturnResultBuilder(TryDeriveLiteralReturnType("toLogicalZone", LanguageConstants.String), LanguageConstants.String) instead of .WithReturnType(LanguageConstants.String) to have the type system try to execute this function on its arguments and derive a literal return type.
If this function is only decidable at deploy time (e.g., if the mapping is based on ARM's service configuration or varies from subscription to subscription), it should probably be defined in AzNamespaceType (like resourceGroup() is), which would make it part of the az namespace.
There was a problem hiding this comment.
Good point! The fact that it contains a parameter named subscriptionId tells me it probably belongs in az regardless.
There was a problem hiding this comment.
Thank you for the feedback! It has been moved to the az namespace.
|
@jmorerice Do you know which ARM release is required for this PR to be merged? |
The Deployments and ARM release is blocked because of logistical issues with configuring a callback so I'm not quite sure of the exact timeline when it would be ready by unfortunately. |
Microsoft Reviewers: Open in CodeFlow