Azure / Azure/bicep

environment() function is missing App Service endpoint

Open
#4,449 1 comment 0 reactions 0 assignees View on GitHub
enhancement intermediate language
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
All versions

**Describe the bug**
The `environment()` function provides a `suffixes` property, with a list of a few cloud-specific suffixes for certain services. App Service is not on this list.

It would be great if I could use `environment().suffixes.appService` and have it resolve to `.azurewebsites.net` in MAC.

**Additional context**
This would be useful for a few situations:

1. Reliably predicting the host name of an App Service/Azure Functions app that hasn't yet been deployed.
2. Reproducing the behaviour of the Azure portal when you create a private DNS zone for a App Service endpoint, where it creates a DNS zone resource named `privatelink.azurewebsites.net`.

Contributor guide

Open the contributing guide

Research direction

Start by locating the implementation and tests for the environment() function's suffixes property. Add coverage for an appService suffix resolving to .azurewebsites.net in MAC, then run the relevant environment() tests to verify the new value.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.