DeviaVir / terraform-provider-gsuite

A @HashiCorp Terraform provider for managing G Suite resources.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return Group Principal ID

kylegoch opened this issue · comments

Would it be possible to have the data resource for gsuite_group return the Principal ID (I think this is what it's called) of the group?

Currently I seem to be only to get the value out of the URL from the Admin Console under Group Management (not at groups.google.com). The URL looks like this for a group https://admin.google.com/ac/groups/xxxxxxxxxxxxxx when you click on it. And I need that id at xxxxxxxxxx elsewhere in Terraform.

commented

I'm not sure that principal ID is available (here's the list of available attributes https://godoc.org/google.golang.org/api/admin/directory/v1#Group), if it is the ID we can try returning that as an attribute, but you should already be able to check data.gsuite_group.your-group.id for it

Yep, that was it! I didnt see id in the docs so i assumed it wasnt available. Doing data.gsuite_group.your-group.id got me the ID i needed. Quick PR to just explicitly call out the id in docs via #157

commented

Thanks for the PR! Your doc update will be deployed soon. Closing this one out.