Hi Eeraerts Senne,
I will try to reproduce your escenarie and test the code, meanwhile I can point the main difference between your Manual configuration and your bicep deployment as you mention is your Authentication. I understood that you want to configure using managed identity so for you 2 main resources on bicep Connections and workflows you need to add Identity section.
Example for Microsoft.Web/connections
:
resource sqlConnection 'Microsoft.Web/connections@2018-07-01-preview' = {
name: 'sqlConnection'
location: resourceGroup().location
properties: {
api: {
id: '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Web/locations/${resourceGroup().location}/managedApis/sql'
}
displayName: 'sqlConnection'
parameterValues: {
'sqlServer': 'your-server-name'
'sqlDatabase': 'your-database-name'
}
}
//# Here your identity need to be setup to use user Assigned Managed Identity
identity: {
type: 'UserAssigned'
userAssignedIdentities: {
'${managedIdentity.id}': {}
}
}
}
The same block for example on Microsoft.Logic/workflows
resource logicApp 'Microsoft.Logic/workflows@2019-05-01' = {
name: 'logicApp'
location: resourceGroup().location
properties: {
definition: {
'$schema': 'https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#'
contentVersion: '1.0.0.0'
actions: {
// Your Logic App actions here
}
triggers: {
// Your Logic App triggers here
}
parameters: {
'$connections': {
defaultValue: {
'sql': {
connectionId: sqlConnection.id
connectionName: sqlConnection.name
id: '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Web/locations/${resourceGroup().location}/managedApis/sql'
}
}
}
}
}
parameters: {
'$connections': {
value: {
'sql': {
connectionId: sqlConnection.id
connectionName: sqlConnection.name
id: '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Web/locations/${resourceGroup().location}/managedApis/sql'
}
}
}
}
}
//# Here your identity need to be setup to use user Assigned Managed Identity
identity: {
type: 'UserAssigned'
userAssignedIdentities: {
'${managedIdentity.id}': {}
}
}
}
If you share your bicep code (without confidential information) i can reproduce your escenarie and help you better.
Let me know. Luis