Skip to content

bicepBCP422 - The warning is unclear #17560

@slavizh

Description

@slavizh

Bicep version
Bicep CLI version 0.36.177 (09988bb)

Describe the bug
I cannot understand the intent of this warning:

A resource of type "Microsoft.Storage/storageAccounts | null" may or may not exist when this function is called, which could cause the deployment to fail.bicep[BCP422](https://aka.ms/bicep/core-diagnostics#BCP422)
Image

First it is unclear why this warning appears at all. Especially that I have condition on calling the function so I know if I should call the function when the account exists and when it does not. Also it is unclear what I need to do to avoid this warning. If the only option is to suppress this manually what is the point of the rule at all?
To Reproduce
Steps to reproduce the behavior:

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions