Function to compile bicep into ARM and use as object
- 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.**
Template Specs and Azure policies with deployifnotexists effect take ARM template as one of their properties. Building bicep into ARM templates requires additional CI/CD steps, git-hooks or to remember to compile bicep before committing to your IaC repository.
**Describe the solution you'd like**
I would like to have a function called `build` that as an argument takes path to a bicep file and as an output returns compiled ARM template. i.e.
```bicep
resource res_templateSpec 'Microsoft.Resources/templateSpecs@2022-02-01' = {
name: name
location: location
properties: {
displayName: 'Service Template'
}
resource version 'versions' = {
name: '1.0.0'
location: location
properties: {
mainTemplate: build('service.bicep') //current way is to use loadJsonContent('service.json')
}
}
}
```
Contributor guide
Research direction
Start by tracing the existing `loadJsonContent('service.json')` usage and the proposed `build('service.bicep')` entry point. Define done as allowing a Bicep path to produce an ARM template object suitable for the `mainTemplate` property of a template spec or Azure policy.
Written by the indexing model from the issue text.
Assessment
- Domain
- cloud, compilers, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100