Repository navigation
Is @onlyIfNotExists() supported when creating a Blob private endpoint?
#20633
|
I want to create a private endpoint if its name is free and leave an existing endpoint untouched. The Bicep documentation describes I tried two deployments in
The second deployment returned
I used Bicep CLI Has anyone successfully created a new private endpoint with this decorator? If so, which API version and configuration worked? If this isn't supported, is there a recommended way to create the endpoint without updating one that another deployment creates between an existence check and the write? |
Replies: 1 comment 1 reply
|
What you're seeing looks like a On the Bicep side, Because I checked open issues in this repo and didn't see one for On the concurrency question: if |
What you're seeing looks like a
Microsoft.NetworkResource Provider bug rather than anything wrong with your Bicep template.On the Bicep side,
@onlyIfNotExists()just emits@options.onlyIfNotExistson the resource in the compiled ARM JSON (languageVersion: 2.0), which tells the ARM deployment engine to includeIf-None-Match: *on thePUTtoMicrosoft.Network/privateEndpoints. Bicep doesn't know anything about the generated NIC.Because
Microsoft.Network/privateEndpointscreates that auto-generatedMicrosoft.Network/networkInterfacesresource during thePUT, the combination in your table (generated NIC created, Blob connection approved, then endpoint failing withPreconditionFailedResourc…