False positive with `use-resource-id-functions` linter rule
Opened this issue · 4 comments
anthony-c-martin commented
Reproduced in Bicep v0.30.23
The following is valid, but causes the use-resource-id-functions
warning to show:
resource foo 'Microsoft.Network/publicIPAddresses@2024-01-01' existing = {
name: 'foo'
}
var frontends = [
{
name: 'foo'
id: foo.id
}
]
resource loadBalancer 'Microsoft.Network/loadBalancers@2023-11-01' = {
name: 'bar'
location: 'westus'
sku: { name: 'Standard' }
properties: {
frontendIPConfigurations: [for frontend in frontends: {
name: frontend.name
properties: {
publicIPAddress: { id: frontend.id }
}
}
]
}
}
anthony-c-martin commented
puicchan commented
@StephenWeatherford , can you take a look. I agree with Anthony. We should disable by default if it is unrealiable.
StephenWeatherford commented
We'll disable by default for now.
StephenWeatherford commented
@anthony-c-martin I think you mean false positive, not negative, correcting the title.