Azure / Azure/bicep

Bicep linked templates - 4Mb limit

Open
#5,890 19 comments 15 reactions 0 assignees View on GitHub
intermediate language
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
v0.4.1124

**Describe the bug**
When compiling our main.bicep (which is refferring to multiple modules which in turn have sub-modules)
We are hitting a limit of 4Mb when doing a **what-if** and a **deploy**.

It's clear to us that there's a limitation on the compiled ARM file however, the question arises is on how we can mitigate this ?
We've been looking around for solutions but Bicep keeps including the modules as a nested child inside of the compile main.json (compiled bicep main.bicep)

Are there ways to tackle this issue / limitation ?
Our bicep includes infrastructure, configuration and api management services and operations. That is the main reason why we're hitting the 4MB limit.

We have an obligation of doing complete builds to keep multiple environments perfectly aligned to eachother.
Seperating or changing deployments can't be done through an incremental mode.

We've been putting months of work in transition to Bicep just to finally run into this issue in our growing architecture. (300 + of APIs)
We really can't move to ARM LinkedURI templates. 😞

**To Reproduce**
Compile a bicep template with modules which is more than 4Mb and try to what-if or deploy the solution to cloud (Azure)

Contributor guide

Open the contributing guide

Research direction

Start with main.bicep and its nested modules, then compare the compiled main.json size with the 4 MB failure during Azure what-if and deployment. Reproduce the issue using a module graph over 4 MB and determine whether the project can identify an actionable mitigation for complete builds within the limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.