Deploying APIM Workspace via Bicep script

Laurens van de Venn 260 Reputation points
2025-10-22T18:33:48.92+00:00

Hello,

I'm trying to deploy APIM Workspace via Bicep script but getting error.
Bicep script:
param apimServiceName string
param workspaceName string
param location string
param workspaceDescription string

// Create APIM Workspace

resource apimWorkspace 'Microsoft.ApiManagement/service/workspaces@2023-03-01-preview' = {

name: '${apimServiceName}/${workspaceName}'

location: location

properties: {

description: workspaceDescription

}

}

Error:

The template resource '/ws-lv-apim-a-icoe' for type 'Microsoft.ApiManagement/service/workspaces' at line '35' and column '58' has incorrect segment lengths. A nested resource type must have identical number of segments as its resource name. A root resource type must have segment length one greater than its resource name
Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.