Azure / Azure/bicep-types-az

APIM Backend Pool can not deploy

Open
#2,170 4 comments 1 reaction 0 assignees View on GitHub
Needs: Triage :mag:
Dominant language
TypeScript
Stars
108
Forks
44
Avg merge
18h 53m
Merged PRs (30d)
29

Description

**Bicep version**
0.27.1

**Describe the bug**
deploy backendpool (Microsoft.ApiManagement/service/backends)
Raise ValidationError
```
ERROR: error executing step command 'provision': deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:

Deployment Error Details:
ValidationError: One or more fields contain incorrect values:
ValidationError: Url is not supported for backend pool.
ValidationError: Protocol is not supported for backend pool.
ValidationError: One or more fields contain incorrect values:
ValidationError: Url is not supported for backend pool.
ValidationError: Protocol is not supported for backend pool.
```

**To Reproduce**
deploy this bicep template.

```
resource apimBackend_0 'Microsoft.ApiManagement/service/backends@2023-05-01-preview' = {
parent: apimService
name: 'my-chat-backend0'
properties: {
description: 'backend0'
type: 'Single'
protocol: 'http'
url: openaiApiUrl
}
}

resource apimBackend_pool 'Microsoft.ApiManagement/service/backends@2023-05-01-preview' = {
parent: apimService
name: 'my-chat-backendpool'
properties: {
description: 'chat-backendpool'
protocol: 'http'
type: 'Pool'
url: 'http://localhost'
pool: {
services: [
{
id: apimBackend_0.id
}
]
}
}
}

```

**Additional context**
I deployed same template 2024/05/13, it's OK.
But today, I try to chnage backend URLs, it raise above Error.

I update azd and bicep to latest versions.
But Error is not resolve.

VSCode syntax checker require protocol and type filelds.
Deployment raise Error, fields is not supported.
I can't understand.....

Contributor guide

No contributing guide indexed for this repository

Research direction

Start from the reproduced Bicep template for Microsoft.ApiManagement/service/backends@2023-05-01-preview and compare the pool declaration with the deployment validation errors. Run the template deployment while checking the backend pool's supported fields; done means the pool deploys without the Url or Protocol validation errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.