Skip to content

[Modules] Replacing hardcoded environment URLs with the environment() function#2358

Merged
krbar merged 5 commits intomainfrom
users/krbar/2224-environment-function
Nov 24, 2022
Merged

[Modules] Replacing hardcoded environment URLs with the environment() function#2358
krbar merged 5 commits intomainfrom
users/krbar/2224-environment-function

Conversation

@krbar
Copy link
Copy Markdown
Contributor

@krbar krbar commented Nov 22, 2022

Description

The PR resolves #2224 and replaces hardcoded environment URLs with the environment() function. In some cases these hardcoded URLs caused the linter warning "no hardcoded environment URL"

More about the environment function: https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-deployment#environment

Following hardcoded env URLs have been identified and replaced:

  • core.windows.net replaced with ${environment().suffixes.storage}
  • .azurecr.io replaced with ${environment().suffixes.acrLoginServer}
  • azurefd.net replaced with ${environment().suffixes.azureFrontDoorEndpointSuffix}

Pipeline references

For module/pipeline changes, please create and attach the status badge of your successful run.

Pipeline
Compute: Disks
Compute: Images
ContainerRegistry: Registries
Network: Frontdoors

Type of Change

  • Bugfix (non-breaking change which fixes an issue)

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (readme)
  • I did format my code

@krbar krbar changed the title Users/krbar/2224 environment function [Modules] Replacing hardcoded environment URLs with the environment() function Nov 22, 2022
@github-actions
Copy link
Copy Markdown

Test Results

  1 files  ±    0    1 suites  ±0   37s ⏱️ - 5m 8s
61 tests  - 513  59 ✔️  - 505  2 💤  - 8  0 ±0 
88 runs   - 503  83 ✔️  - 496  5 💤  - 7  0 ±0 

Results for commit 2533195. ± Comparison against base commit d28cadd.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 22, 2022

Test Results

  1 files  ±    0    1 suites  ±0   29s ⏱️ - 5m 16s
60 tests  - 514  58 ✔️  - 506  2 💤  -   8  0 ±0 
60 runs   - 531  58 ✔️  - 521  2 💤  - 10  0 ±0 

Results for commit 2533195. ± Comparison against base commit d28cadd.

♻️ This comment has been updated with latest results.

@krbar krbar marked this pull request as ready for review November 24, 2022 12:09
@krbar krbar requested a review from a team as a code owner November 24, 2022 12:09
@krbar krbar merged commit 13e08df into main Nov 24, 2022
@krbar krbar deleted the users/krbar/2224-environment-function branch November 24, 2022 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Discuss environment() function usage vs hardcoded value for privateDNSZone names

2 participants