Hi Daniel Rogers,
Thank you for clarifying that this is related to Azure Data Explorer cluster deployment. I apologize for the initial confusion with those questions they were intended for a different service. the problem is that when you enable restrictOutboundNetworkAccess, the cluster takes longer to fully set up, and Bicep tries to grab the output properties (dataIngestionUri and uri) before they are ready. That's why you get the error those properties only show up after the cluster is fully deployed.
The fix is simple: split your deployment into two steps. First, deploy the cluster. Then in a second deployment, reference the already-created cluster to grab the outputs. This way, everything's ready by the time you ask for those values.
Here's what to do:
text
// Second deployment file - run this AFTER the cluster is created
resource existingCluster 'Microsoft.Kusto/clusters@2024-04-13' existing = {
name: clusterName
}
output clusterDataIngestionUri string = existingCluster.properties.dataIngestionUri
output clusterUri string = existingCluster.properties.uri
output clusterName string = existingCluster.name
output clusterResourceId string = existingCluster.id
Deploy the cluster first, then deploy this separate template for outputs. It will work every time without having to toggle settings.
Helpful References:
Restrict outbound access from Azure Data Explorer
Microsoft.Kusto/clusters Bicep reference
Azure Data Explorer cluster REST API
Troubleshoot Bicep file deployments
Please let us know if you have any questions and concerns.