-
Is your feature request related to a problem? Please describe. Ideally, when a parameter is used in a resource or module where its parameter is also decorated with @allowed(['Standard_RAGRS', 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS']) // I'm probably missing a few
param sku string
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
name: 'name'
sku: {
name: sku
}
// ...
} Describe the solution you'd like Possible syntax: @allowed(allowedOf(storageAccount.sku.name))
param sku string
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
name: 'name'
sku: {
name: sku
}
// ...
} This would allow the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
param sku resourceInput<'Microsoft.Storage/storageAccounts@2023-01-01'>.sku.name
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
name: 'name'
sku: {
name: sku
}
// ...
} |
Beta Was this translation helpful? Give feedback.
@allowed()
will only support literal values, but you can use type syntax to make this work (and atype
statement if you want to reuse it in multiple places):