Revisit snapshot data model (struct vs map) after more validation rules
- 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
Assessment
This issue has not been assessed yet.