terraform-provider-azuread
terraform-provider-azuread copied to clipboard
A list of objects returned for azuread_groups like azuread_users operates
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritise this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritise the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
I am hoping you might be able to have a list of group objects, similar to how this is done in azuread_users and azuread_service_principals.
New or Affected Resource(s)
- azuread_groups
Potential Terraform Configuration
data "azuread_groups" "self" {
display_names = ["example-group"]
ignore_missing = true
security_enabled = true
}
output "group" {
value = data.azuread_groups.self.groups
}
References
- #735 - Only vaguely related
Hi there - I believe this can be closed.
This data source already exists and you are able to iterate over the groups as an output in the same syntax you have used above.
No not true. If you look at either azuread_users or azuread_service_principals what I linked to was that those data sources return a list of objects and in each object is a large set of information. The azuread_groups however only returns 2 lists 1 of display_names and one of object_ids which is far less extensive and powerful.
Very true - Apologies for miss-interpreting your issue.
This change would require that objects are returned instead of the two lists which is feasible but a relatively big rework to this data source. I'll have a look later this week unless someone else takes a shot at it.
This would pretty much be a breaking change for this resource for it's current usages.
well, i would figure to keep the 2 lists and add a third list of objects. that way there is no breaking change. I keep telling myself I'll find time to look into this myself, it just hasn't happened yet. There's no big pressing need for this, but I think it's a better alternative than a zip to match the 2 lists of display_names and object_ids to correlate them.