Azure / Azure/bicep

Object reference not set to an instance of an object when deploying app service or slot with one of the properties value as object.

Open
#8,189 17 comments 0 reactions 1 assignee Claimed by @alex-frankel View on GitHub
provider bug revisit
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

Azure Bicep Cli Version - 0.9.1

We were using below module code to deploy app service since past 3 months but never faced the failure but now when we try to deploy it randomly throws the below error.
We are deploying 5 app services using a for loop and app service module.
"Object reference not set to an instance of an object ".
![image](https://user-images.githubusercontent.com/59794856/187481646-331c784d-8a18-44ac-93b8-ff12af04e82d.png)
After spending couple of hours of debugging the below module, we concluded if the property value for 'ipSecurityRestrictions' is not passed then its working fine but as soon as we are passing this highlighted array then its failing randomly for any app service. On further checking the ARM template in deployment history its creating object for its values.
We are not only sending object as IPSecurityRestrictions but also for app service config application settings also.
Please let us know if this issue is due to recent upgrades in resource manage or do we need to pass all the objects as parameters.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.