- Notifications
You must be signed in to change notification settings - Fork24
feat: addrbac_roles tocoder_workspace_owner data source#330
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
github-actionsbot commentedJan 23, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
All contributors have signed the CLA ✍️ ✅ |
nxf5025 commentedJan 23, 2025
I have read the CLA Document and I hereby sign the CLA |
d784267 to7414a32CompareEmyrk commentedJan 27, 2025
It does require some coder/coder updates. I have plans to pull in more user context such as |
0c3001a to9bae197ComparePart ofcoder/terraform-provider-coder#330Adds support for the coder_workspace_owner.rbac_roles attribute
coder_workspace_owner data sourcecoder_workspace_owner data sourcerbac_roles tocoder_workspace_owner data sourceprovider/workspace_owner.go Outdated
| varrbacRoles []string | ||
| ifrolesRaw,ok:=os.LookupEnv("CODER_WORKSPACE_OWNER_RBAC_ROLES");ok { | ||
| iferr:=json.NewDecoder(strings.NewReader(rolesRaw)).Decode(&rbacRoles);err!=nil { | ||
| returndiag.Errorf("invalid user rbac roles: %s",err.Error()) | ||
| } | ||
| } | ||
| _=rd.Set("rbac_roles",rbacRoles) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
CODER_WORKSPACE_OWNER_RBAC_ROLES is now a data structure right?
So we need to json decode the env var, and correct the schema to be an object with 2 fields:name andorg_id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Correct - I plan to revisit this today or tomorrow and make the updates based on the changes in the other PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@nxf5025 awesome, just keep pinging me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@Emyrk - Just pushed an update. Let me know if any changes are needed
9bae197 to8d20979Comparenxf5025 commentedMar 14, 2025
Hey@Emyrk - Anything else you need from my end? |
Emyrk left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LG 👍
eab8698 intocoder:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This PR updates the schema for the coder_workspace_owner data source to expose rbac_roles.
It's very similar to#287
Relevant
coder/coderPR -coder/coder#16407