Did a refactor of some of our Bicep template code for our AKS clusters today.
Before, we were using a rather complicated line of code using string interpolation.
var vnetSubnetId = '${resourceId(vnetResourceGroupName, 'Microsoft.Network/virtualNetworks', vnetName)}/subnets/${vnetSubnetName}' This was hard to read and the Bicep linter gave the following warning in my editor and during deployment:
WARNING: D:\a\1\a\drop\Generic-templates\containers\azure-kubernetes-service\v4.0\templates\aks.bicep(117,7) : Warning use-resource-id-functions: If property “vnetSubnetID” represents a resource ID, it must use a symbolic resource reference, be a parameter or start with one of these functions: extensionResourceId, guid, if, reference, resourceId, subscription, subscriptionResourceId, tenantResourceId. Found nonconforming expression at vnetSubnetID -> vnetSubnetId [https://aka.ms/bicep/linter/use-resource-id-functions]
...