Azure / Azure/bicep

issue with latest bicep cli Error BCP036: The property "managedIdentity" expected a value of type "object" but the provided value is of type "string"

Open
#6,070 9 comments 0 reactions 0 assignees View on GitHub
revisit
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

I am part of a team working on an APIM landing zone. See https://github.com/Azure/apim-landing-zone-accelerator/tree/main/reference-implementations/AppGW-IAPIM-Func/bicep

This bicep for this was working - and then I (and others) got this error
issue with latest bicep cli Error BCP036: The property "managedIdentity" expected a value of type "object" but the provided value is of type "string"

On trying to reproduce this I figured out the only thing that changed was that I upgraded to 1272.
On downgrading back to 1008 (did not try 1124), I noticed the error disappeared. So it seems like ARM generated with 1272 creates an issue

**To Reproduce**
Try the following - clone the repo https://github.com/Azure/apim-landing-zone-accelerator
go into the gateway directory - https://github.com/Azure/apim-landing-zone-accelerator/tree/main/reference-implementations/AppGW-IAPIM-Func/bicep/gateway
do a bicep build of appgw.bicep to generate ARM template
reverse engineer this ARM template back to bicep
Check the errors - Try this with 1272 and 1008

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Clone Azure's apim-landing-zone-accelerator and work in reference-implementations/AppGW-IAPIM-Func/bicep/gateway. Build appgw.bicep with Bicep CLI 1272 and 1008, reverse engineer the generated ARM template back to Bicep, and compare the managedIdentity diagnostics. Done means the version-related type mismatch is reproduced and the round trip no longer reports BCP036.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.