Azure / Azure/bicep

Support for template source file introspection

Open
#9,055 1 comment 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

Create a function that allows introspection of the bicep template source file, returning details such as filename and hash. The values would become string literals in the compiled ARM template. These can be used for source traceability. Example:

```
resource contosoZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
name: 'contoso.com'
tags: {
SourcePath: file().path // /src/modules/dns/contosozone.bicep
SourceFile: file().name // contosozone.bicep
SourceHash: file().hash // 365d36e5599ac9cef725cd93defe6966f2bb16a76fe67cfb4a09f023c64255e1
}
}
```

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating how Bicep functions are handled and how compiled ARM templates receive string literals. Done means a template source introspection function exposes the filename, path, and hash values shown in the example for source traceability.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.