Skip to content

chore: Add tags to prevent SFI W18 Policy violation#971

Open
NirajC-Microsoft wants to merge 4 commits into
dev-v4from
psl-SFIW18
Open

chore: Add tags to prevent SFI W18 Policy violation#971
NirajC-Microsoft wants to merge 4 commits into
dev-v4from
psl-SFIW18

Conversation

@NirajC-Microsoft
Copy link
Copy Markdown
Contributor

Purpose

This pull request focuses on improving tag management for deployed resources and making minor template optimizations in the infrastructure code. The main enhancement is the merging of resource group tags with custom tags for the container app environment, ensuring better consistency and traceability. Additionally, there are small updates to resource scoping and dependency ordering, as well as changes to the Bicep-to-ARM template generator metadata.

Tag management improvements:

  • Updated the containerAppEnvironment module in both infra/main.bicep and infra/main_custom.bicep to merge resourceGroup().tags with custom tags, ensuring that all resources inherit tags from the resource group in addition to any custom tags. [1] [2]
  • Modified the corresponding ARM template (infra/main.json) to use shallowMerge(createArray(resourceGroup().tags, parameters('tags'))), aligning the JSON output with the new tag merging logic.

Template and resource definition updates:

  • Changed the scope property for some resources (e.g., Microsoft.CognitiveServices/accounts and Microsoft.Web/sites) to use format() instead of resourceId() for improved clarity and consistency. [1] [2]
  • Adjusted the ordering of dependencies in the dependsOn array for private DNS zones to ensure correct deployment sequencing.

Bicep/ARM template metadata:

  • Updated the Bicep template generator version and template hash metadata throughout infra/main.json to reflect the changes and maintain consistency. [1] [2] [3] [4] [5] [6] [7]

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

This comment was marked as resolved.

Copilot AI review requested due to automatic review settings May 8, 2026 12:42

This comment was marked as outdated.

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.

2 participants