Skip to content

Investigate using bicep snapshot predictedResources for resource group ownership classification #7643

@jongio

Description

@jongio

Summary

Investigate whether bicep snapshot + predictedResources can supplement or simplify the resource group ownership classification pipeline introduced in #7603.

Context

In the PR #7603 discussion, @vhvb1989 identified that bicep snapshot's predictedResources output only includes resources the deployment creates — resources declared with the existing keyword are excluded. This could provide a fast, offline, deterministic signal for distinguishing created vs. pre-existing resource groups.

Investigation areas

  1. Tier 0 / Tier 1 supplement: Can predictedResources serve as a "Tier 0" check that short-circuits the classification pipeline when Bicep source files are available?
  2. Source file availability: azd down currently works purely from deployment metadata. Snapshot requires the original Bicep files — how often are they available at destroy time?
  3. Adopted/redeployed RGs: Does snapshot correctly handle RGs that were created externally then deployed into (operation type would be Create but the RG pre-existed)?
  4. Nested deployments and modules: Are RGs created via nested deployments or modules flattened into predictedResources?
  5. Deployment outputs: RGs referenced via deployment outputs (e.g., output rgName string = resourceGroup.name) are not resources — how to handle these?
  6. Deployment stacks path: The stacks path skips RG classification entirely — does snapshot interact with this?

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions