Azure / Azure/bicep

Add environment() as bicep parameter file function

Open
#13,607 2 comments 3 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.**
The Bicep Linter is complaining about a disallowed host that cannot be resolved from the bicepparam file.

**Describe the solution you'd like**
Currently there are 2 functions available in bicepparam files, see https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-parameters-file
I would like to see environment() supported as well to resolve this issue and I can apply the fix that is suggested by the Linter.

![image](https://github.com/Azure/bicep/assets/55690746/f072cbb7-4099-4ae1-aa50-3584a067e6b6)

Contributor guide

Open the contributing guide

Research direction

Start by reading the bicepparam parameter-file functions documentation and reproducing the Bicep Linter warning for the unresolved host. Compare the existing supported functions with the requested environment() behavior. Done means environment() is accepted in bicepparam files and resolves the host so the disallowed-host warning is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
43/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.