Azure / Azure/bicep

There is currently no way to re-map where shared modules can be found on disk.

Open
#7,394 0 comments 11 reactions 0 assignees View on GitHub
enhancement Needs: Upvote
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.**
We have a shared folder with modules, used by different projects that all have relative links to those modules ../../shared
This works fine locally but not in CI.

**Describe the solution you'd like**
I'd love to be able to specify an alias for a shared folder simlar to how the bicepconfig already allows you to alias templatespecs.

local:
```
{
"moduleAliases": {
"file": {
"SharedModules": {
"path":"../../shared'
}
}
}
}
```

CI: (after replace in json)
```
{
"moduleAliases": {
"file": {
"SharedModules": {
"path":"dist/shared"
}
}
}
}
```

In code:

```
module containerAppModule 'shared/container-app.bicep' = {
name: 'containerAppModule'
``

Contributor guide

Open the contributing guide

Research direction

Start with bicepconfig's existing templatespec alias support and the moduleAliases examples in the issue. Trace how file module paths are resolved in local and CI layouts, then define done as resolving the same shared/container-app.bicep reference through a configurable SharedModules alias in both configurations.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.