Skip to content

fix(logging): replace inline AMA resources with avm/ptn/alz/ama module#1157

Merged
oZakari merged 6 commits into
Azure:mainfrom
oZakari:investigate-issue-4110-ama
Apr 20, 2026
Merged

fix(logging): replace inline AMA resources with avm/ptn/alz/ama module#1157
oZakari merged 6 commits into
Azure:mainfrom
oZakari:investigate-issue-4110-ama

Conversation

@oZakari
Copy link
Copy Markdown
Contributor

@oZakari oZakari commented Apr 20, 2026

Overview/Summary

Replace inline AMA resource declarations in the logging module with the br/public:avm/ptn/alz/ama:0.2.0 AVM pattern module. This fixes the duplicate lock resource name collision that causes InvalidTemplate errors when using Azure Deployment Stacks.

Related Issues/Work Items

This PR fixes/adds/changes/removes

  1. Removes inline resource declarations for: User Assigned Managed Identity, VM Insights DCR (PerfAndMap + PerfOnly), Change Tracking DCR, MDFC SQL DCR, and all associated lock resources (~473 lines removed)
  2. Adds a single module call to br/public:avm/ptn/alz/ama:0.2.0 which deploys all AMA resources with unique lock names that prevent Deployment Stacks validation failures
  3. Removes AMA-specific outputs (outUserAssignedManagedIdentity*, outDataCollectionRule*) — these are now available via the AVM module directly
  4. Preserves all existing parameters for backward compatibility (unused DCR lock params suppressed with #disable-next-line)

Breaking Changes

  1. Removed outputs: outUserAssignedManagedIdentityId, outUserAssignedManagedIdentityPrincipalId, outDataCollectionRuleVMInsightsName, outDataCollectionRuleVMInsightsId, outDataCollectionRuleChangeTrackingName, outDataCollectionRuleChangeTrackingId, outDataCollectionRuleMDFCSQLName, outDataCollectionRuleMDFCSQLId — no downstream consumers found in the repo

Testing Evidence

  • Bicep build: bicep build completes with no errors
  • Deployed successfully to rg-alz-logging-test in sub-amba-repobackup subscription using logging.parameters.min.json
  • Deployment alz-logging-test-3 succeeded with state Succeeded

As part of this Pull Request I have

oZakari and others added 4 commits March 16, 2026 21:51
Replace inline User Assigned Managed Identity, VM Insights DCR,
Change Tracking DCR, MDFC SQL DCR and their lock resources with
a call to br/public:avm/ptn/alz/ama:0.2.0 which fixes duplicate
lock resource name collision in Azure Deployment Stacks.

Closes Azure/Azure-Landing-Zones#4110
@oZakari oZakari added Area: Logging & Automation 📷 Issues / PR's related to Logging & Automation labels Apr 20, 2026
@oZakari oZakari merged commit a4e62f7 into Azure:main Apr 20, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Logging & Automation 📷 Issues / PR's related to Logging & Automation

Projects

None yet

2 participants