Skip to content

feat: add owner groups to workspace data #12841

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

Merged
merged 19 commits into from
Apr 5, 2024
Merged

feat: add owner groups to workspace data #12841

merged 19 commits into from
Apr 5, 2024

Conversation

f0ssel
Copy link
Contributor

@f0ssel f0ssel commented Apr 1, 2024

Closes #8560

With this change you can now use coder_workspace.me.owner_groups in terraform templates and get a list of groups the owner is in.

As a practical test, I added MY_GROUPS = jsonencode(data.coder_workspace.me.owner_groups) to the ENV block of the coder agent and built a workspace:
Screenshot 2024-04-03 at 1 03 46 PM

@f0ssel f0ssel force-pushed the f0ssel/owner-groups branch from 554cb37 to 9ae8efb Compare April 3, 2024 17:14
@f0ssel f0ssel marked this pull request as ready for review April 3, 2024 17:22
@f0ssel f0ssel requested review from kylecarbs and sreya April 3, 2024 17:22
@f0ssel f0ssel requested review from Emyrk and sreya April 4, 2024 17:51
@f0ssel f0ssel merged commit f96ce80 into main Apr 5, 2024
26 checks passed
@f0ssel f0ssel deleted the f0ssel/owner-groups branch April 5, 2024 19:06
@github-actions github-actions bot locked and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return user's groups as a Terraform data source for templates
3 participants