Azure / Azure/bicep

Bicep restore command improvements

Open
#17,802 4 comments 2 reactions 0 assignees View on GitHub
enhancement Needs: Discussion story: registry
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Is your feature request related to a problem? Please describe.**
Currently with Bicep restore command you only have the option to reference local Bicep template that contains reference to Bicep modules to pull the module and the module is saved in special path. That is somehow restrictive as in order to consume (deploy) a module you have to consume it only via local Bicep Template. There is no option in the Az CLI or Az PS commands for deployment to deploy module from ACR. There is only option for doing that via Template spec. Also what if you want to move your modules from one container registry to another container registry?

**Describe the solution you'd like**
My suggestion is to have different switches for Bicep Restore command to be able to do the following things:
- Point to module in ACR via URL to pull the module locally instead to local file. Credentials used will be still taken from what is pointed in bicepconfig file.
- Ability to specify path to where the module will be pulled
- As you can publish with source code you should be able to pull both the source and the compiled ARM template in case you want to use any of them for different purposes.

These features will allow the following scenarios:
- Deploy via Az CLI or Az PS modules published in ACR without having to create local module. You can pull the published module before deployment and after that use the commands to reference those local files. That way you can use ACR like any artifacts store and open more CI/CD scenarios.
- Being able to migrate from one container registry to another in case it is required.
- Being able to sync one container registry to another by pulling the modules locally and pushing them to another registry.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing Bicep restore command and how it reads credentials from bicepconfig. Review the ACR publishing behavior for source and compiled ARM templates, then define the command’s URL, destination-path, and artifact-selection interfaces. Done means the documented deployment, registry migration, and registry synchronization scenarios work.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cli, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.