OrganizationCustomRoleArgs

data class OrganizationCustomRoleArgs(val baseRole: Output<String>? = null, val description: Output<String>? = null, val name: Output<String>? = null, val permissions: Output<List<String>>? = null) : ConvertibleToJava<OrganizationCustomRoleArgs>

This resource allows you to create and manage custom roles in a GitHub Organization for use in repositories.

Note: Custom roles are currently only available in GitHub Enterprise Cloud.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.OrganizationCustomRole;
import com.pulumi.github.OrganizationCustomRoleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new OrganizationCustomRole("example", OrganizationCustomRoleArgs.builder()
.baseRole("read")
.description("Example custom role that uses the read role as its base")
.permissions(
"add_assignee",
"add_label",
"bypass_branch_protection",
"close_issue",
"close_pull_request",
"mark_as_duplicate",
"create_tag",
"delete_issue",
"delete_tag",
"manage_deploy_keys",
"push_protected_branch",
"read_code_scanning",
"reopen_issue",
"reopen_pull_request",
"request_pr_review",
"resolve_dependabot_alerts",
"resolve_secret_scanning_alerts",
"view_secret_scanning_alerts",
"write_code_scanning")
.build());
}
}

Import

Custom roles can be imported using the id of the role. The id of the custom role can be found using the list custom roles in an organization API.

$ pulumi import github:index/organizationCustomRole:OrganizationCustomRole example 1234

Constructors

Link copied to clipboard
constructor(baseRole: Output<String>? = null, description: Output<String>? = null, name: Output<String>? = null, permissions: Output<List<String>>? = null)

Properties

Link copied to clipboard
val baseRole: Output<String>? = null

The system role from which the role inherits permissions. Can be one of: read, triage, write, or maintain.

Link copied to clipboard
val description: Output<String>? = null

The description for the custom role.

Link copied to clipboard
val name: Output<String>? = null

The name of the custom role.

Link copied to clipboard
val permissions: Output<List<String>>? = null

A list of additional permissions included in this role. Must have a minimum of 1 additional permission. The list of available permissions can be found using the list repository fine-grained permissions for an organization API.

Functions

Link copied to clipboard
open override fun toJava(): OrganizationCustomRoleArgs