EnterpriseActionsRunnerGroupArgs

data class EnterpriseActionsRunnerGroupArgs(val allowsPublicRepositories: Output<Boolean>? = null, val enterpriseSlug: Output<String>? = null, val name: Output<String>? = null, val restrictedToWorkflows: Output<Boolean>? = null, val selectedOrganizationIds: Output<List<Int>>? = null, val selectedWorkflows: Output<List<String>>? = null, val visibility: Output<String>? = null) : ConvertibleToJava<EnterpriseActionsRunnerGroupArgs>

This resource allows you to create and manage GitHub Actions runner groups within your GitHub enterprise. You must have admin access to an enterprise to use this resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const enterprise = github.getEnterprise({
slug: "my-enterprise",
});
const enterpriseOrganization = new github.EnterpriseOrganization("enterprise_organization", {
enterpriseId: enterprise.then(enterprise => enterprise.id),
name: "my-organization",
billingEmail: "octocat@octo.cat",
adminLogins: ["octocat"],
});
const example = new github.EnterpriseActionsRunnerGroup("example", {
name: "my-awesome-runner-group",
enterpriseSlug: enterprise.then(enterprise => enterprise.slug),
allowsPublicRepositories: true,
visibility: "selected",
selectedOrganizationIds: [enterpriseOrganization&#46;databaseId],
restrictedToWorkflows: true,
selectedWorkflows: ["my-organization/my-repo/&#46;github/workflows/cool-workflow&#46;yaml@refs/tags/v1"],
});
import pulumi
import pulumi_github as github
enterprise = github.get_enterprise(slug="my-enterprise")
enterprise_organization = github.EnterpriseOrganization("enterprise_organization",
enterprise_id=enterprise.id,
name="my-organization",
billing_email="octocat@octo.cat",
admin_logins=["octocat"])
example = github.EnterpriseActionsRunnerGroup("example",
name="my-awesome-runner-group",
enterprise_slug=enterprise.slug,
allows_public_repositories=True,
visibility="selected",
selected_organization_ids=[enterprise_organization&#46;database_id],
restricted_to_workflows=True,
selected_workflows=["my-organization/my-repo/&#46;github/workflows/cool-workflow&#46;yaml@refs/tags/v1"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var enterprise = Github.GetEnterprise.Invoke(new()
{
Slug = "my-enterprise",
});
var enterpriseOrganization = new Github.EnterpriseOrganization("enterprise_organization", new()
{
EnterpriseId = enterprise.Apply(getEnterpriseResult => getEnterpriseResult.Id),
Name = "my-organization",
BillingEmail = "octocat@octo.cat",
AdminLogins = new[]
{
"octocat",
},
});
var example = new Github.EnterpriseActionsRunnerGroup("example", new()
{
Name = "my-awesome-runner-group",
EnterpriseSlug = enterprise.Apply(getEnterpriseResult => getEnterpriseResult.Slug),
AllowsPublicRepositories = true,
Visibility = "selected",
SelectedOrganizationIds = new[]
{
enterpriseOrganization.DatabaseId,
},
RestrictedToWorkflows = true,
SelectedWorkflows = new[]
{
"my-organization/my-repo/.github/workflows/cool-workflow.yaml@refs/tags/v1",
},
});
});
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
enterprise, err := github.GetEnterprise(ctx, &github.GetEnterpriseArgs{
Slug: "my-enterprise",
}, nil)
if err != nil {
return err
}
enterpriseOrganization, err := github.NewEnterpriseOrganization(ctx, "enterprise_organization", &github.EnterpriseOrganizationArgs{
EnterpriseId: pulumi.String(enterprise.Id),
Name: pulumi.String("my-organization"),
BillingEmail: pulumi.String("octocat@octo.cat"),
AdminLogins: pulumi.StringArray{
pulumi.String("octocat"),
},
})
if err != nil {
return err
}
_, err = github.NewEnterpriseActionsRunnerGroup(ctx, "example", &github.EnterpriseActionsRunnerGroupArgs{
Name: pulumi.String("my-awesome-runner-group"),
EnterpriseSlug: pulumi.String(enterprise.Slug),
AllowsPublicRepositories: pulumi.Bool(true),
Visibility: pulumi.String("selected"),
SelectedOrganizationIds: pulumi.IntArray{
enterpriseOrganization.DatabaseId,
},
RestrictedToWorkflows: pulumi.Bool(true),
SelectedWorkflows: pulumi.StringArray{
pulumi.String("my-organization/my-repo/.github/workflows/cool-workflow.yaml@refs/tags/v1"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetEnterpriseArgs;
import com.pulumi.github.EnterpriseOrganization;
import com.pulumi.github.EnterpriseOrganizationArgs;
import com.pulumi.github.EnterpriseActionsRunnerGroup;
import com.pulumi.github.EnterpriseActionsRunnerGroupArgs;
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) {
final var enterprise = GithubFunctions.getEnterprise(GetEnterpriseArgs.builder()
.slug("my-enterprise")
.build());
var enterpriseOrganization = new EnterpriseOrganization("enterpriseOrganization", EnterpriseOrganizationArgs.builder()
.enterpriseId(enterprise.id())
.name("my-organization")
.billingEmail("octocat@octo.cat")
.adminLogins("octocat")
.build());
var example = new EnterpriseActionsRunnerGroup("example", EnterpriseActionsRunnerGroupArgs.builder()
.name("my-awesome-runner-group")
.enterpriseSlug(enterprise.slug())
.allowsPublicRepositories(true)
.visibility("selected")
.selectedOrganizationIds(enterpriseOrganization.databaseId())
.restrictedToWorkflows(true)
.selectedWorkflows("my-organization/my-repo/.github/workflows/cool-workflow.yaml@refs/tags/v1")
.build());
}
}
resources:
enterpriseOrganization:
type: github:EnterpriseOrganization
name: enterprise_organization
properties:
enterpriseId: ${enterprise.id}
name: my-organization
billingEmail: octocat@octo.cat
adminLogins:
- octocat
example:
type: github:EnterpriseActionsRunnerGroup
properties:
name: my-awesome-runner-group
enterpriseSlug: ${enterprise.slug}
allowsPublicRepositories: true
visibility: selected
selectedOrganizationIds:
- ${enterpriseOrganization.databaseId}
restrictedToWorkflows: true
selectedWorkflows:
- my-organization/my-repo/.github/workflows/cool-workflow.yaml@refs/tags/v1
variables:
enterprise:
fn::invoke:
function: github:getEnterprise
arguments:
slug: my-enterprise

Import

This resource can be imported using the enterprise slug and the ID of the runner group:

$ pulumi import github:index/enterpriseActionsRunnerGroup:EnterpriseActionsRunnerGroup test enterprise-slug/42

Constructors

Link copied to clipboard
constructor(allowsPublicRepositories: Output<Boolean>? = null, enterpriseSlug: Output<String>? = null, name: Output<String>? = null, restrictedToWorkflows: Output<Boolean>? = null, selectedOrganizationIds: Output<List<Int>>? = null, selectedWorkflows: Output<List<String>>? = null, visibility: Output<String>? = null)

Properties

Link copied to clipboard
val allowsPublicRepositories: Output<Boolean>? = null

Whether public repositories can be added to the runner group. Defaults to false.

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

The slug of the enterprise.

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

Name of the runner group

Link copied to clipboard
val restrictedToWorkflows: Output<Boolean>? = null

If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.

Link copied to clipboard
val selectedOrganizationIds: Output<List<Int>>? = null

IDs of the organizations which should be added to the runner group

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

List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.

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

Visibility of a runner group to enterprise organizations. Whether the runner group can include all or selected

Functions

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