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

new data source: azurerm_resource_groups to fetch multiple RGs #22346

Open
1 task done
avishnyakov opened this issue Jul 2, 2023 · 0 comments
Open
1 task done

new data source: azurerm_resource_groups to fetch multiple RGs #22346

avishnyakov opened this issue Jul 2, 2023 · 0 comments

Comments

@avishnyakov
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

It would be great to have azurerm_resource_groups data source to fetch mutiole resource groups based on tags.
Behaviors and design should be similar to azurerm_resources

Use cases for this multiepl RG dat source

  • fetch multiple RGs with specific tags
  • then use these RGs: to fetch specific resources inside OR provision specific resources

azurerm_resources allows lookup of resources, but not RGs.

New or Affected Resource(s)/Data Source(s)

azurerm_resource_groups

Potential Terraform Configuration

data "azurerm_resource_groups" "dev_resource_groups" {
  required_tags = {
    environment = "dev"
  }
}

resource "something_cool_for_all_dev_rgs" "something" {
  count = length(data.azurerm_resource_groups.dev_resource_groups.resource_groups)

  # ..
}

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants