github.ActionsRunnerGroup
Explore with Pulumi AI
This resource allows you to create and manage GitHub Actions runner groups within your GitHub enterprise organizations. You must have admin access to an organization to use this resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = new github.Repository("example", {name: "my-repository"});
const exampleActionsRunnerGroup = new github.ActionsRunnerGroup("example", {
name: example.name,
visibility: "selected",
selectedRepositoryIds: [example.repoId],
});
import pulumi
import pulumi_github as github
example = github.Repository("example", name="my-repository")
example_actions_runner_group = github.ActionsRunnerGroup("example",
name=example.name,
visibility="selected",
selected_repository_ids=[example.repo_id])
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 {
example, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
Name: pulumi.String("my-repository"),
})
if err != nil {
return err
}
_, err = github.NewActionsRunnerGroup(ctx, "example", &github.ActionsRunnerGroupArgs{
Name: example.Name,
Visibility: pulumi.String("selected"),
SelectedRepositoryIds: pulumi.IntArray{
example.RepoId,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = new Github.Repository("example", new()
{
Name = "my-repository",
});
var exampleActionsRunnerGroup = new Github.ActionsRunnerGroup("example", new()
{
Name = example.Name,
Visibility = "selected",
SelectedRepositoryIds = new[]
{
example.RepoId,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.Repository;
import com.pulumi.github.RepositoryArgs;
import com.pulumi.github.ActionsRunnerGroup;
import com.pulumi.github.ActionsRunnerGroupArgs;
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 Repository("example", RepositoryArgs.builder()
.name("my-repository")
.build());
var exampleActionsRunnerGroup = new ActionsRunnerGroup("exampleActionsRunnerGroup", ActionsRunnerGroupArgs.builder()
.name(example.name())
.visibility("selected")
.selectedRepositoryIds(example.repoId())
.build());
}
}
resources:
example:
type: github:Repository
properties:
name: my-repository
exampleActionsRunnerGroup:
type: github:ActionsRunnerGroup
name: example
properties:
name: ${example.name}
visibility: selected
selectedRepositoryIds:
- ${example.repoId}
Create ActionsRunnerGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ActionsRunnerGroup(name: string, args: ActionsRunnerGroupArgs, opts?: CustomResourceOptions);
@overload
def ActionsRunnerGroup(resource_name: str,
args: ActionsRunnerGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ActionsRunnerGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
visibility: Optional[str] = None,
allows_public_repositories: Optional[bool] = None,
name: Optional[str] = None,
restricted_to_workflows: Optional[bool] = None,
selected_repository_ids: Optional[Sequence[int]] = None,
selected_workflows: Optional[Sequence[str]] = None)
func NewActionsRunnerGroup(ctx *Context, name string, args ActionsRunnerGroupArgs, opts ...ResourceOption) (*ActionsRunnerGroup, error)
public ActionsRunnerGroup(string name, ActionsRunnerGroupArgs args, CustomResourceOptions? opts = null)
public ActionsRunnerGroup(String name, ActionsRunnerGroupArgs args)
public ActionsRunnerGroup(String name, ActionsRunnerGroupArgs args, CustomResourceOptions options)
type: github:ActionsRunnerGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ActionsRunnerGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ActionsRunnerGroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ActionsRunnerGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ActionsRunnerGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ActionsRunnerGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var actionsRunnerGroupResource = new Github.ActionsRunnerGroup("actionsRunnerGroupResource", new()
{
Visibility = "string",
AllowsPublicRepositories = false,
Name = "string",
RestrictedToWorkflows = false,
SelectedRepositoryIds = new[]
{
0,
},
SelectedWorkflows = new[]
{
"string",
},
});
example, err := github.NewActionsRunnerGroup(ctx, "actionsRunnerGroupResource", &github.ActionsRunnerGroupArgs{
Visibility: pulumi.String("string"),
AllowsPublicRepositories: pulumi.Bool(false),
Name: pulumi.String("string"),
RestrictedToWorkflows: pulumi.Bool(false),
SelectedRepositoryIds: pulumi.IntArray{
pulumi.Int(0),
},
SelectedWorkflows: pulumi.StringArray{
pulumi.String("string"),
},
})
var actionsRunnerGroupResource = new ActionsRunnerGroup("actionsRunnerGroupResource", ActionsRunnerGroupArgs.builder()
.visibility("string")
.allowsPublicRepositories(false)
.name("string")
.restrictedToWorkflows(false)
.selectedRepositoryIds(0)
.selectedWorkflows("string")
.build());
actions_runner_group_resource = github.ActionsRunnerGroup("actionsRunnerGroupResource",
visibility="string",
allows_public_repositories=False,
name="string",
restricted_to_workflows=False,
selected_repository_ids=[0],
selected_workflows=["string"])
const actionsRunnerGroupResource = new github.ActionsRunnerGroup("actionsRunnerGroupResource", {
visibility: "string",
allowsPublicRepositories: false,
name: "string",
restrictedToWorkflows: false,
selectedRepositoryIds: [0],
selectedWorkflows: ["string"],
});
type: github:ActionsRunnerGroup
properties:
allowsPublicRepositories: false
name: string
restrictedToWorkflows: false
selectedRepositoryIds:
- 0
selectedWorkflows:
- string
visibility: string
ActionsRunnerGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ActionsRunnerGroup resource accepts the following input properties:
- Visibility string
- Visibility of a runner group. Whether the runner group can include
all
,selected
, orprivate
repositories. A value ofprivate
is not currently supported due to limitations in the GitHub API. - Allows
Public boolRepositories - Whether public repositories can be added to the runner group. Defaults to false.
- Name string
- Name of the runner group
- Restricted
To boolWorkflows - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
- Selected
Repository List<int>Ids - IDs of the repositories which should be added to the runner group
- Selected
Workflows List<string> - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
- Visibility string
- Visibility of a runner group. Whether the runner group can include
all
,selected
, orprivate
repositories. A value ofprivate
is not currently supported due to limitations in the GitHub API. - Allows
Public boolRepositories - Whether public repositories can be added to the runner group. Defaults to false.
- Name string
- Name of the runner group
- Restricted
To boolWorkflows - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
- Selected
Repository []intIds - IDs of the repositories which should be added to the runner group
- Selected
Workflows []string - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
- visibility String
- Visibility of a runner group. Whether the runner group can include
all
,selected
, orprivate
repositories. A value ofprivate
is not currently supported due to limitations in the GitHub API. - allows
Public BooleanRepositories - Whether public repositories can be added to the runner group. Defaults to false.
- name String
- Name of the runner group
- restricted
To BooleanWorkflows - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
- selected
Repository List<Integer>Ids - IDs of the repositories which should be added to the runner group
- selected
Workflows List<String> - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
- visibility string
- Visibility of a runner group. Whether the runner group can include
all
,selected
, orprivate
repositories. A value ofprivate
is not currently supported due to limitations in the GitHub API. - allows
Public booleanRepositories - Whether public repositories can be added to the runner group. Defaults to false.
- name string
- Name of the runner group
- restricted
To booleanWorkflows - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
- selected
Repository number[]Ids - IDs of the repositories which should be added to the runner group
- selected
Workflows string[] - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
- visibility str
- Visibility of a runner group. Whether the runner group can include
all
,selected
, orprivate
repositories. A value ofprivate
is not currently supported due to limitations in the GitHub API. - allows_
public_ boolrepositories - Whether public repositories can be added to the runner group. Defaults to false.
- name str
- Name of the runner group
- restricted_
to_ boolworkflows - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
- selected_
repository_ Sequence[int]ids - IDs of the repositories which should be added to the runner group
- selected_
workflows Sequence[str] - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
- visibility String
- Visibility of a runner group. Whether the runner group can include
all
,selected
, orprivate
repositories. A value ofprivate
is not currently supported due to limitations in the GitHub API. - allows
Public BooleanRepositories - Whether public repositories can be added to the runner group. Defaults to false.
- name String
- Name of the runner group
- restricted
To BooleanWorkflows - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
- selected
Repository List<Number>Ids - IDs of the repositories which should be added to the runner group
- selected
Workflows List<String> - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
Outputs
All input properties are implicitly available as output properties. Additionally, the ActionsRunnerGroup resource produces the following output properties:
- Default bool
- Whether this is the default runner group
- Etag string
- An etag representing the runner group object
- Id string
- The provider-assigned unique ID for this managed resource.
- Inherited bool
- Whether the runner group is inherited from the enterprise level
- Runners
Url string - The GitHub API URL for the runner group's runners
- Selected
Repositories stringUrl - GitHub API URL for the runner group's repositories
- Default bool
- Whether this is the default runner group
- Etag string
- An etag representing the runner group object
- Id string
- The provider-assigned unique ID for this managed resource.
- Inherited bool
- Whether the runner group is inherited from the enterprise level
- Runners
Url string - The GitHub API URL for the runner group's runners
- Selected
Repositories stringUrl - GitHub API URL for the runner group's repositories
- default_ Boolean
- Whether this is the default runner group
- etag String
- An etag representing the runner group object
- id String
- The provider-assigned unique ID for this managed resource.
- inherited Boolean
- Whether the runner group is inherited from the enterprise level
- runners
Url String - The GitHub API URL for the runner group's runners
- selected
Repositories StringUrl - GitHub API URL for the runner group's repositories
- default boolean
- Whether this is the default runner group
- etag string
- An etag representing the runner group object
- id string
- The provider-assigned unique ID for this managed resource.
- inherited boolean
- Whether the runner group is inherited from the enterprise level
- runners
Url string - The GitHub API URL for the runner group's runners
- selected
Repositories stringUrl - GitHub API URL for the runner group's repositories
- default bool
- Whether this is the default runner group
- etag str
- An etag representing the runner group object
- id str
- The provider-assigned unique ID for this managed resource.
- inherited bool
- Whether the runner group is inherited from the enterprise level
- runners_
url str - The GitHub API URL for the runner group's runners
- selected_
repositories_ strurl - GitHub API URL for the runner group's repositories
- default Boolean
- Whether this is the default runner group
- etag String
- An etag representing the runner group object
- id String
- The provider-assigned unique ID for this managed resource.
- inherited Boolean
- Whether the runner group is inherited from the enterprise level
- runners
Url String - The GitHub API URL for the runner group's runners
- selected
Repositories StringUrl - GitHub API URL for the runner group's repositories
Look up Existing ActionsRunnerGroup Resource
Get an existing ActionsRunnerGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ActionsRunnerGroupState, opts?: CustomResourceOptions): ActionsRunnerGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allows_public_repositories: Optional[bool] = None,
default: Optional[bool] = None,
etag: Optional[str] = None,
inherited: Optional[bool] = None,
name: Optional[str] = None,
restricted_to_workflows: Optional[bool] = None,
runners_url: Optional[str] = None,
selected_repositories_url: Optional[str] = None,
selected_repository_ids: Optional[Sequence[int]] = None,
selected_workflows: Optional[Sequence[str]] = None,
visibility: Optional[str] = None) -> ActionsRunnerGroup
func GetActionsRunnerGroup(ctx *Context, name string, id IDInput, state *ActionsRunnerGroupState, opts ...ResourceOption) (*ActionsRunnerGroup, error)
public static ActionsRunnerGroup Get(string name, Input<string> id, ActionsRunnerGroupState? state, CustomResourceOptions? opts = null)
public static ActionsRunnerGroup get(String name, Output<String> id, ActionsRunnerGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allows
Public boolRepositories - Whether public repositories can be added to the runner group. Defaults to false.
- Default bool
- Whether this is the default runner group
- Etag string
- An etag representing the runner group object
- Inherited bool
- Whether the runner group is inherited from the enterprise level
- Name string
- Name of the runner group
- Restricted
To boolWorkflows - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
- Runners
Url string - The GitHub API URL for the runner group's runners
- Selected
Repositories stringUrl - GitHub API URL for the runner group's repositories
- Selected
Repository List<int>Ids - IDs of the repositories which should be added to the runner group
- Selected
Workflows List<string> - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
- Visibility string
- Visibility of a runner group. Whether the runner group can include
all
,selected
, orprivate
repositories. A value ofprivate
is not currently supported due to limitations in the GitHub API.
- Allows
Public boolRepositories - Whether public repositories can be added to the runner group. Defaults to false.
- Default bool
- Whether this is the default runner group
- Etag string
- An etag representing the runner group object
- Inherited bool
- Whether the runner group is inherited from the enterprise level
- Name string
- Name of the runner group
- Restricted
To boolWorkflows - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
- Runners
Url string - The GitHub API URL for the runner group's runners
- Selected
Repositories stringUrl - GitHub API URL for the runner group's repositories
- Selected
Repository []intIds - IDs of the repositories which should be added to the runner group
- Selected
Workflows []string - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
- Visibility string
- Visibility of a runner group. Whether the runner group can include
all
,selected
, orprivate
repositories. A value ofprivate
is not currently supported due to limitations in the GitHub API.
- allows
Public BooleanRepositories - Whether public repositories can be added to the runner group. Defaults to false.
- default_ Boolean
- Whether this is the default runner group
- etag String
- An etag representing the runner group object
- inherited Boolean
- Whether the runner group is inherited from the enterprise level
- name String
- Name of the runner group
- restricted
To BooleanWorkflows - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
- runners
Url String - The GitHub API URL for the runner group's runners
- selected
Repositories StringUrl - GitHub API URL for the runner group's repositories
- selected
Repository List<Integer>Ids - IDs of the repositories which should be added to the runner group
- selected
Workflows List<String> - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
- visibility String
- Visibility of a runner group. Whether the runner group can include
all
,selected
, orprivate
repositories. A value ofprivate
is not currently supported due to limitations in the GitHub API.
- allows
Public booleanRepositories - Whether public repositories can be added to the runner group. Defaults to false.
- default boolean
- Whether this is the default runner group
- etag string
- An etag representing the runner group object
- inherited boolean
- Whether the runner group is inherited from the enterprise level
- name string
- Name of the runner group
- restricted
To booleanWorkflows - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
- runners
Url string - The GitHub API URL for the runner group's runners
- selected
Repositories stringUrl - GitHub API URL for the runner group's repositories
- selected
Repository number[]Ids - IDs of the repositories which should be added to the runner group
- selected
Workflows string[] - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
- visibility string
- Visibility of a runner group. Whether the runner group can include
all
,selected
, orprivate
repositories. A value ofprivate
is not currently supported due to limitations in the GitHub API.
- allows_
public_ boolrepositories - Whether public repositories can be added to the runner group. Defaults to false.
- default bool
- Whether this is the default runner group
- etag str
- An etag representing the runner group object
- inherited bool
- Whether the runner group is inherited from the enterprise level
- name str
- Name of the runner group
- restricted_
to_ boolworkflows - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
- runners_
url str - The GitHub API URL for the runner group's runners
- selected_
repositories_ strurl - GitHub API URL for the runner group's repositories
- selected_
repository_ Sequence[int]ids - IDs of the repositories which should be added to the runner group
- selected_
workflows Sequence[str] - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
- visibility str
- Visibility of a runner group. Whether the runner group can include
all
,selected
, orprivate
repositories. A value ofprivate
is not currently supported due to limitations in the GitHub API.
- allows
Public BooleanRepositories - Whether public repositories can be added to the runner group. Defaults to false.
- default Boolean
- Whether this is the default runner group
- etag String
- An etag representing the runner group object
- inherited Boolean
- Whether the runner group is inherited from the enterprise level
- name String
- Name of the runner group
- restricted
To BooleanWorkflows - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
- runners
Url String - The GitHub API URL for the runner group's runners
- selected
Repositories StringUrl - GitHub API URL for the runner group's repositories
- selected
Repository List<Number>Ids - IDs of the repositories which should be added to the runner group
- selected
Workflows List<String> - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.
- visibility String
- Visibility of a runner group. Whether the runner group can include
all
,selected
, orprivate
repositories. A value ofprivate
is not currently supported due to limitations in the GitHub API.
Import
This resource can be imported using the ID of the runner group:
$ pulumi import github:index/actionsRunnerGroup:ActionsRunnerGroup test 7
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
github
Terraform Provider.