Azure / Azure/azure-rest-api-specs
[BUG] - Updating an Scoped Resource on Private Link Scope Fails
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 37m
- Merged PRs (30d)
- 446
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs
### API Spec version
2021-07-01-preview
### Describe the bug
I am using following Bicep to add an App Insights instance to an existing private link scope
resource privatelinkedscoperesource 'Microsoft.Insights/privateLinkScopes/scopedResources@2021-07-01-preview' = {
name: 'AppInsightsPrivateLinkScope'
parent: privatelinkscope
properties: {
linkedResourceId: appinsights_name_resource.id
}
}
it works fine the first time when adding it, but fails with the following error on the subsequent deployments even though it's an Incremental release. Can we do anything to change this behaviour? otherwise we'll have to comment this part of template and only uncomment it for initial deployment which is a pretty bad solution.
"code":"Conflict","message":"Scoped resource with same linked resource id already exists in this private link scope"
### Expected behavior
It should complete successfully
### Actual behavior
Fails with this error
"code":"Conflict","message":"Scoped resource with same linked resource id already exists in this private link scope"
### Reproduction Steps
Create a Bicep script with references for an App Insights and Private Link Scope instance and then add this section.
resource privatelinkedscoperesource 'Microsoft.Insights/privateLinkScopes/scopedResources@2021-07-01-preview' = {
name: 'AppInsightsPrivateLinkScope'
parent: privatelinkscope
properties: {
linkedResourceId: appinsights_name_resource.id
}
}
### Environment
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.