Repository navigation
feat(azure): describeResources via az resource show (partial #42) - #49
Merged
Merged
Conversation
Brings Azure into the snapshot-supported set. For each declared Azure
entity, runs:
az resource show --resource-group <env> --name <name> \
--resource-type <type> -o json
mapping the response to ResourceMetadata keyed by chant entity name
(uses props.name from #39's entity-prop pass-through). The environment
is treated as the Azure resource group name.
Status comes from `properties.provisioningState` (the standard ARM
field for resource state). `PRESENT` is the fallback when the field
is absent.
Top-level ARM types only — nested types like
`Microsoft.Storage/storageAccounts/blobServices` are warn-skipped
since `az resource show` doesn't accept compound type names. Future
work could add a per-nested-type query path.
Resource-not-found is silent — state diff --live then reports as
missing (declared, not in cloud).
6 unit tests with mocked exec cover the happy path, missing
provisioningState, az failure, nested-type warn-skip, non-Azure
entity types, and missing name.
This was referenced May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Continues progress on #42. Brings the Azure lexicon into the snapshot-supported set (now 5 of 11 lexicons covered: AWS, Temporal, K8s, GCP, Azure).
For each declared Azure entity, shells out to:
The
<env>argument is treated as the Azure resource group name (consistent with how the AWS lexicon uses<env>as the CloudFormation stack name).Status mapping
properties.provisioningStateis the standard ARM field for resource state. Mapped directly tostatus.PRESENTis the fallback when the field is absent.Top-level types only
Nested ARM types like
Microsoft.Storage/storageAccounts/blobServicesare warn-skipped —az resource showdoesn't accept compound type names directly. Adding a per-nested-type query path is a future improvement.Tests
6 unit cases with mocked
exec:provisioningState→PRESENTazfailure (resource not found) → entity left outazcallnameprop → silently skippedCoverage table
helm, dockerVerification
just buildcleannpx vitest run lexicons/azure/→ 6/6 new + existing pass