Skip to content

feat(hubs): add resourceGroupTags for internal test deployments - #2289

Draft
Michael Flanakin (flanakin) wants to merge 2 commits into
devfrom
flanakin/2241-rg-tags-fte
Draft

feat(hubs): add resourceGroupTags for internal test deployments#2289
Michael Flanakin (flanakin) wants to merge 2 commits into
devfrom
flanakin/2241-rg-tags-fte

Conversation

@flanakin

Copy link
Copy Markdown
Collaborator

Summary

  • Adds an optional resourceGroupTags parameter to main.bicep that merges tags onto the resource group the hub deploys into
  • main.bicep is resource-group scoped, so it has no other way to touch the RG's own tags — the existing tags/tagsByResource params only tag resources inside the RG, which doesn't affect ACI provisioning
  • Implemented via Microsoft.Resources/tags (a plain ARM resource), not a deploymentScript — it doesn't provision an ACI itself, so it can't hit the timeout it's meant to help work around
  • Merges with union(resourceGroup().tags, resourceGroupTags) rather than replacing, so it won't clobber any tags already required by the target subscription's own policy
  • Skipped entirely when the parameter is empty (default), so it adds zero deployment overhead for the vast majority of users who'll never set it

Why

Requested in #2241 (DeploymentScriptACIProvisioningTimeout) as a way for Microsoft FTEs to deploy internal test hubs with SecurityControl=Ignore set on the resource group, which works around tenant security policies (SFI) blocking deployment scripts from using storage account shared keys — the same root cause diagnosed in #1816. Only one internal tag is known/documented (SecurityControl=Ignore); the parameter accepts an arbitrary tag object so others can be added later without another template change.

No portal UI change: createUiDefinition.json configures the deployment target, not the resource group the portal already created before the template runs — a portal checkbox literally can't express "tag the resource group." This is deliberately Bicep-parameter-only (CLI/PowerShell-visible, not portal-visible) so it stays out of the way for public deployers who don't need it.

Test plan

  • bicep build compiles clean
  • Full PowerShell lint suite passes (3585/3585)
  • Maintainer review — draft because Brett Wilson (@MSBrett) may know of 1-2 additional internal tags worth including in the same pass (only SecurityControl=Ignore is documented anywhere in this repo's history; searched issues/discussions/code exhaustively)

Related: #2241, #1816

🤖 Generated with Claude Code

Adds an optional resourceGroupTags Bicep parameter that merges tags onto the
resource group the hub template deploys into (main.bicep is resource-group
scoped and has no other way to touch the RG's own tags). Uses
Microsoft.Resources/tags, not a deploymentScript, so it doesn't provision an
ACI and can't hit the timeout it exists to work around.

Intended for Microsoft FTEs deploying internal test hubs that need a
resource-group-level policy tag -- most commonly SecurityControl=Ignore to
bypass tenant security policies (e.g. SFI) that block deployment scripts from
using storage account shared keys, causing DeploymentScriptACIProvisioningTimeout
(#2241, #1816). No portal UI change: createUiDefinition.json configures the
deployment target, not the resource group the portal already created before
the template runs, so a portal checkbox can't express this. Deliberately
Bicep-parameter-only (CLI/PowerShell-visible) so it doesn't add UI clutter for
the vast majority of deployments that will never need it.

Documents the parameter and both ways to set the tag (az group create/update,
or the new parameter) in the DeploymentScriptACIProvisioningTimeout
troubleshooting entry.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Review 👀 PR that is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants