I am trying to create logicapp api connnection for service bus using Bicep, below is the bicep code.
resource ServicebusApiCon 'Microsoft.Web/connections@2016-06-01' = {
name: 'servicebus123'
location: Location
kind: 'V2'
properties: {
displayName: 'servicebus'
api: {
name: 'servicebus'
id: '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Web/locations/${Location}/managedApis/servicebus'
type: 'Microsoft.Web/locations/managedApis'
parameterValueSet: {
name: 'managedIdentityAuth'
values: {
namespaceEndpoint: {
value: 'https://servicebus.servicebus.windows.net:443/'
}
}
}
}
}
}
for storage account:
parameterValueSet: {
name: 'managedIdentityAuth'
values: {
accountName: 'storageaccountname'
}
}
for keyvault:
parameterValueSet: {
name: 'managedIdentityAuth'
values: {
vaultName: 'keyvaultname'
}
}
I am getting below error while deploying it. could you please someone help me if something is missing or wrong ?
**{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource
deployment operation failed. Please list deployment operations for details. Please see
https://aka.ms/DeployOperations for usage details.","details":
[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\":
\"InvalidRequestContent\",\r\n \"message\": \"The request content is not valid and could
not be deserialized: 'Could not find member 'parameterValueSet' on object of type
'ManagedApiReference'. Path 'parameterValueSet', line 1, position 258.'.\"\r\n
}\r\n}"}]}}**
CodePudding user response:
The api-version
should be 2018-07-01-preview :
resource servicebusConnector 'Microsoft.Web/connections@2018-07-01-preview' = {
name: 'servicebus123'
location: location
kind: 'V2'
properties: {
api: {
id: '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Web/locations/${location}/managedApis/servicebus'
}
displayName: 'servicebus'
parameterValueSet: {
name: 'managedIdentityAuth'
values: {
namespaceEndpoint: {
value: 'sb://${servicebusName}.servicebus.windows.net/'
}
}
}
}
}