Language support for Bicep deployments
- 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.**
I would like to author deployments using Bicep rather than ARM templates. I often run deployments from code rather than the shell (ex: integration tests, k8s operators, control plane applications, etc). Currently, I have a poor experience because I need to write boilerplate to detect my platform, pull bicep from GitHub releases, mark it as executable, then invoke it as a program.
The same problem space has been touched upon in` vscode-bicep` and `azure-cli`, but neither has shipped "the solution" as a maintained package to npm, pypi, nuget, etc. Other projects are beginning to awkwardly inject makefiles rather than using npm scripts.
There is a .NET specific Issue related to this topic here: https://github.com/Azure/bicep/issues/529
**Describe the solution you'd like**
I want a code-centric way to build and deploy Bicep. I would like all management libraries that support deploying ARM templates to have the same level of support for deploying Bicep. Ex: `@azure/arm-resources` should let me do something similar to
```typescript
import { ResourceManagementClient, Bicep } from '@azure/arm-resources';
async function deploy(pathToBicep: string, resourceGroup: string) {
const resources = new ResourceManagementClient(new DefaultAzureCredential(), '00000000-0000-0000-0000-000000000000');
const armTemplate = Bicep.build(pathToBicep);
await resources.deployments.createOrUpdate(resourceGroup, 'deployment1', armTemplate);
}
```
I am happy if under the hood, that means downloading and wrapping calls to a native executable as long as it is well-documented and eventually has the right set of escape hatches that would let me use it in a restricted/enterprise environment.
Contributor guide
Assessment
This issue has not been assessed yet.