Skip to content

RG mode: uses azlist with rg included, with special handling for empty rg#574

Merged
magodo merged 1 commit intoAzure:mainfrom
magodo:rg_use_azlist
Nov 11, 2024
Merged

RG mode: uses azlist with rg included, with special handling for empty rg#574
magodo merged 1 commit intoAzure:mainfrom
magodo:rg_use_azlist

Conversation

@magodo
Copy link
Copy Markdown
Collaborator

@magodo magodo commented Nov 11, 2024

This PR is an improvement on #500, that we leverages the azlist to include the resource group being listed as part of the resource list. The benefit of this is that azlist will pick up any extension resources for the resource list, including the resoruce group itself (which solves the #573). The only thing need special handling is that for empty resource group, the resource group won't be listed, in which case we'll have to manually add the resource group to the resource list.

Fix #573

@magodo magodo added the bug Something isn't working label Nov 11, 2024
@magodo magodo requested a review from ms-henglu November 11, 2024 04:15
@magodo magodo merged commit 6478cf6 into Azure:main Nov 11, 2024
@giuliohome
Copy link
Copy Markdown

Thank you very much for the super fast fix! 🚀

However, after a first test from the source repo branch,

giulio@WPWS19069419:/mnt/c/Dati/golang/aztfy$ git branch -vv
* rg_use_azlist f6bad23 [origin/rg_use_azlist] RG mode: uses `azlist` with rg included, with special handling for empty rg

I still can't see the role assignment, what am I missing now?

giulio@WPWS19069419:/mnt/c/Dati/golang/aztfy$ ~/go/bin/aztfexport rg --append --include-role-assignment --output-dir tf_
test -n my-rg
giulio@WPWS19069419:/mnt/c/Dati/golang/aztfy$ cat tf_test/main.aztfexport.tf
resource "azurerm_resource_group" "res-0" {
  location = "westeurope"
  name     = "my-rg"
}

Thanks in advance for your clarification.

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