Bicep Template failing on privateEndpointConnections
Mahesh chandak
25
Reputation points
Hi,
We are getting the below error while deploying privateEndpointConnections for service bus.
ERROR: {"status":"Failed","error":{"code":"DeploymentFailed","target":"/subscriptions/e03a9d4e-499f-4fd2-8fd1-4d13d0756fc2/resourceGroups/rg-dev-uks-integrations-common/providers/Microsoft.Resources/deployments/azuredeploy","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"PrivateEndpointConnectionInvalidStateChange","message":"A state change from Approved to Approved is not valid"}]}}
Here is the snip of the bicep template. Also just to let you know the private endpoint connection already exists. But we expect the bicep template to not fail and just update the existing resource.
Bicep snip
var servicebusprivateendpoint='/subscriptions/xxx/resourceGroups/rg-${environment}-xxxx/providers/Microsoft.Network/privateEndpoints/xxx'
resource privateEndpointConnections_102e8d0a_a3b0_4307_849d_39d2ac85be19 'Microsoft.ServiceBus/namespaces/privateEndpointConnections@2022-10-01-preview' = {
parent: servicebus_namespace_resource
name: '102e8d0a-a3b0-4307-849d-39d2ac85be19'
location: resource_location
properties: {
provisioningState: 'Succeeded'
privateEndpoint: {
id: servicebusprivateendpoint
}
privateLinkServiceConnectionState: {
status: 'Approved'
description: 'Auto-Approved'
}
}
}
Sign in to answer