Azure / Azure/bicep

`no-hardcoded-env-urls` should be disabled when `targetScope` is `local`

Open
#17,469 0 comments 0 reactions 0 assignees View on GitHub
Local Deploy
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
Bicep CLI version 0.36.90 (a8510cf601)

**Describe the bug**
When targeting the local scope, using any well-known azure url will trigger the `no-hardcoded-env-urls` warning despite the `az` namespace not exposing the `environment()` function

**To Reproduce**
By using the following main.bicep:

```bicep
targetScope = 'local'

var kvUrl = 'vault.azure.net'

var env= az.environment()
```

You will notice that `no-hardcoded-env-urls` is triggered on the `kvUrl ` line and that the function `environment()` is not available on the `env` line.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.