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

Filter by either ARM or HCL resource provider type #181

Closed
MohnJadden opened this issue Jul 21, 2022 · 1 comment · Fixed by #231
Closed

Filter by either ARM or HCL resource provider type #181

MohnJadden opened this issue Jul 21, 2022 · 1 comment · Fixed by #231
Labels
question Further information is requested

Comments

@MohnJadden
Copy link

Aztfy works wonderfully for importing resources and I hugely appreciate the interactive mode. However, it would be wonderful if there's a way to only include results by specific HCL or ARM resource providers - that way if we have to import a resource group and only care about specific resources, we can target those.

My real-world example: I need to use aztfy to import six resource groups and their Azure Virtual Desktop resources (azurerm_virtual_desktop_host_pool, azurerm_virtual_desktop_workspace, azurerm_virtual_desktop_application_group, etc.) I'd like to be able to do something like aztfy rg VDI-ResourceGroup-1 -filter azurerm_virtual_desktop_host_pool azurerm_virtual_desktop_workspace azurerm_virtual_desktop_application_group to enumerate that I only want resources under those specific HCL providers, or aztfy rg VDI-ResourceGroup-1 -filter azurerm_virtual_desktop* to enumerate that I want to see any resource provider resources that start with the term "azurerm_virtual_desktop".

@magodo magodo added enhancement New feature or request and removed enhancement New feature or request labels Jul 22, 2022
@magodo
Copy link
Collaborator

magodo commented Jul 22, 2022

@MohnJadden In this case you can repeatedly use aztfy resource --append <ressource id> to terrafy those resources. The only thing you need to figure out is the resource id of them, for which you can use either azure cli, Portal, ARG, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants