Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RG mode: Two step list, rg itself (incl. ext), then resources (incl. ext) in it #576

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented Nov 12, 2024

This PR is a fix for the #574, which doesn't handle exporting the extension resources assigned to an empty resource group. The reason is that azlist by default query resources from the ARG Resources table, if a resource group is empty, then the query by resource group name won't return any resource, and we end up explicitly add this empty resource group to the resource list, but didn't check if any ext resource exists on it.

This PR fixes this by firstly listing the RG itself, with any ext resource if any, from the ResourceContainers table. Then, if the RG exists, we'll further list the resources in it, including the ext resources, from the Resources table.

Fix #573. Supersedes #575.

Test

A non-empty RG:

image

An empty RG:

image

@magodo magodo added the bug Something isn't working label Nov 12, 2024
@magodo magodo requested a review from ms-henglu November 12, 2024 00:58
@magodo magodo mentioned this pull request Nov 12, 2024
@magodo
Copy link
Collaborator Author

magodo commented Nov 12, 2024

/azp list

Copy link

No pipelines found for this repository.

@YanaXu
Copy link
Collaborator

YanaXu commented Nov 12, 2024

/azp list

Copy link

Commenter does not have sufficient privileges for PR 576 in repo Azure/aztfexport

@magodo
Copy link
Collaborator Author

magodo commented Nov 12, 2024

/azp where

@magodo magodo merged commit 2dcb4e9 into Azure:main Nov 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--include-role-assignment not working
3 participants