Skip to content

Conversation

@magodo
Copy link
Collaborator

@magodo magodo commented Aug 8, 2025

Make the resource mode to make an additional get call to validate the specified resource exists, instead of being marked as errored resource at a later point (from the provider). This makes sense for the resource mode since these resources are specified explicitly by the users, so if they don't exist, shall fail fast.

The benefit of this additional call is that it brings all the features from azlist, including the already exposed ones like --include-role-assignment. This PR extends the features to also include --recursive, --include-resource-group.

Now with a RG, which contains a vnet, which contains a subnet can be exported together with: aztfy res -r --include-resource-group <vnet-id>. Whilst, aztfy res -r <rg-id> only returns the resource group, since the --recursive only returns the direct child resources.

After: #642

@magodo magodo added the enhancement New feature or request label Aug 8, 2025
@magodo magodo marked this pull request as ready for review August 8, 2025 03:28
Copy link
Member

@gerrytan gerrytan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, nice work!

@magodo magodo merged commit be4487e into Azure:main Aug 8, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants