Azure / Azure/azure-dev

Revisit snapshot data model (struct vs map) after more validation rules

Open
#7,117 0 comments 0 reactions 1 assignee Claimed by @vhvb1989 View on GitHub
area/extensions enhancement ext-models
Dominant language
Go
Stars
569
Forks
364
Avg merge
2d 19h
Merged PRs (30d)
136

Description

## Context
Follow-up from [PR #7053](https://github.com/Azure/azure-dev/pull/7053) review. Parent tracking issue: #7112

## PR Conversations
- [Bicep snapshot approach and partial evaluator tradeoffs](https://github.com/Azure/azure-dev/pull/7053#discussion_r2926664634) (@tg-msft, @vhvb1989)
- [Struct vs map for snapshot resources](https://github.com/Azure/azure-dev/pull/7053#discussion_r2926762069) (@tg-msft, @vhvb1989)

## What needs to change
1. Evaluate whether the parsed `SnapshotResource` struct or a simple `map[string]any` is the better approach for representing snapshot resources.
2. Concern: providing multiple ways of exposing data (struct + raw JSON) may make it harder to add helpful features later.
3. Consider implications for provider-agnostic snapshots discussion.
4. Also consider whether metadata (e.g., expected quota decorations on params) survives through bicep snapshot — this may drive need for alternative approaches in the future.

**Note**: Keep current approach for now. Revisit after adding more validation rules to gain experience on what works well.

## Files to update
- `cli/azd/pkg/infra/provisioning/bicep/local_preflight.go` (SnapshotResource type)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.