feat(provisioner): add support for workspace_owner_rbac_roles (#16407)

Part of https://github.com/coder/terraform-provider-coder/pull/330

Adds support for the coder_workspace_owner.rbac_roles attribute
This commit is contained in:
Nick Fisher
2025-03-02 14:54:44 -06:00
committed by GitHub
parent fc2815cfdb
commit ca23abe12c
7 changed files with 522 additions and 342 deletions
+21
View File
@@ -269,6 +269,11 @@ export interface Module {
key: string;
}
export interface Role {
name: string;
orgId: string;
}
/** Metadata is information about a workspace used in the execution of a build */
export interface Metadata {
coderUrl: string;
@@ -289,6 +294,7 @@ export interface Metadata {
workspaceOwnerSshPrivateKey: string;
workspaceBuildId: string;
workspaceOwnerLoginType: string;
workspaceOwnerRbacRoles: Role[];
}
/** Config represents execution configuration shared by all subsequent requests in the Session */
@@ -905,6 +911,18 @@ export const Module = {
},
};
export const Role = {
encode(message: Role, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
if (message.orgId !== "") {
writer.uint32(18).string(message.orgId);
}
return writer;
},
};
export const Metadata = {
encode(message: Metadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.coderUrl !== "") {
@@ -961,6 +979,9 @@ export const Metadata = {
if (message.workspaceOwnerLoginType !== "") {
writer.uint32(146).string(message.workspaceOwnerLoginType);
}
for (const v of message.workspaceOwnerRbacRoles) {
Role.encode(v!, writer.uint32(154).fork()).ldelim();
}
return writer;
},
};