1. Packages
  2. GitHub
  3. API Docs
  4. ActionsRunnerGroup
GitHub v6.2.1 published on Thursday, May 23, 2024 by Pulumi

github.ActionsRunnerGroup

Explore with Pulumi AI

github logo
GitHub v6.2.1 published on Thursday, May 23, 2024 by Pulumi

    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.

    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, or private repositories. A value of private is not currently supported due to limitations in the GitHub API.
    AllowsPublicRepositories bool
    Whether public repositories can be added to the runner group. Defaults to false.
    Name string
    Name of the runner group
    RestrictedToWorkflows bool
    If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
    SelectedRepositoryIds List<int>
    IDs of the repositories which should be added to the runner group
    SelectedWorkflows 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, or private repositories. A value of private is not currently supported due to limitations in the GitHub API.
    AllowsPublicRepositories bool
    Whether public repositories can be added to the runner group. Defaults to false.
    Name string
    Name of the runner group
    RestrictedToWorkflows bool
    If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
    SelectedRepositoryIds []int
    IDs of the repositories which should be added to the runner group
    SelectedWorkflows []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, or private repositories. A value of private is not currently supported due to limitations in the GitHub API.
    allowsPublicRepositories Boolean
    Whether public repositories can be added to the runner group. Defaults to false.
    name String
    Name of the runner group
    restrictedToWorkflows Boolean
    If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
    selectedRepositoryIds List<Integer>
    IDs of the repositories which should be added to the runner group
    selectedWorkflows 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, or private repositories. A value of private is not currently supported due to limitations in the GitHub API.
    allowsPublicRepositories boolean
    Whether public repositories can be added to the runner group. Defaults to false.
    name string
    Name of the runner group
    restrictedToWorkflows boolean
    If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
    selectedRepositoryIds number[]
    IDs of the repositories which should be added to the runner group
    selectedWorkflows 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, or private repositories. A value of private is not currently supported due to limitations in the GitHub API.
    allows_public_repositories bool
    Whether public repositories can be added to the runner group. Defaults to false.
    name str
    Name of the runner group
    restricted_to_workflows bool
    If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
    selected_repository_ids Sequence[int]
    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, or private repositories. A value of private is not currently supported due to limitations in the GitHub API.
    allowsPublicRepositories Boolean
    Whether public repositories can be added to the runner group. Defaults to false.
    name String
    Name of the runner group
    restrictedToWorkflows Boolean
    If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
    selectedRepositoryIds List<Number>
    IDs of the repositories which should be added to the runner group
    selectedWorkflows 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
    RunnersUrl string
    The GitHub API URL for the runner group's runners
    SelectedRepositoriesUrl string
    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
    RunnersUrl string
    The GitHub API URL for the runner group's runners
    SelectedRepositoriesUrl string
    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
    runnersUrl String
    The GitHub API URL for the runner group's runners
    selectedRepositoriesUrl String
    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
    runnersUrl string
    The GitHub API URL for the runner group's runners
    selectedRepositoriesUrl string
    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_url str
    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
    runnersUrl String
    The GitHub API URL for the runner group's runners
    selectedRepositoriesUrl String
    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.
    The following state arguments are supported:
    AllowsPublicRepositories bool
    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
    RestrictedToWorkflows bool
    If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
    RunnersUrl string
    The GitHub API URL for the runner group's runners
    SelectedRepositoriesUrl string
    GitHub API URL for the runner group's repositories
    SelectedRepositoryIds List<int>
    IDs of the repositories which should be added to the runner group
    SelectedWorkflows 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, or private repositories. A value of private is not currently supported due to limitations in the GitHub API.
    AllowsPublicRepositories bool
    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
    RestrictedToWorkflows bool
    If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
    RunnersUrl string
    The GitHub API URL for the runner group's runners
    SelectedRepositoriesUrl string
    GitHub API URL for the runner group's repositories
    SelectedRepositoryIds []int
    IDs of the repositories which should be added to the runner group
    SelectedWorkflows []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, or private repositories. A value of private is not currently supported due to limitations in the GitHub API.
    allowsPublicRepositories Boolean
    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
    restrictedToWorkflows Boolean
    If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
    runnersUrl String
    The GitHub API URL for the runner group's runners
    selectedRepositoriesUrl String
    GitHub API URL for the runner group's repositories
    selectedRepositoryIds List<Integer>
    IDs of the repositories which should be added to the runner group
    selectedWorkflows 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, or private repositories. A value of private is not currently supported due to limitations in the GitHub API.
    allowsPublicRepositories boolean
    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
    restrictedToWorkflows boolean
    If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
    runnersUrl string
    The GitHub API URL for the runner group's runners
    selectedRepositoriesUrl string
    GitHub API URL for the runner group's repositories
    selectedRepositoryIds number[]
    IDs of the repositories which should be added to the runner group
    selectedWorkflows 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, or private repositories. A value of private is not currently supported due to limitations in the GitHub API.
    allows_public_repositories bool
    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_workflows bool
    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_url str
    GitHub API URL for the runner group's repositories
    selected_repository_ids Sequence[int]
    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, or private repositories. A value of private is not currently supported due to limitations in the GitHub API.
    allowsPublicRepositories Boolean
    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
    restrictedToWorkflows Boolean
    If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false.
    runnersUrl String
    The GitHub API URL for the runner group's runners
    selectedRepositoriesUrl String
    GitHub API URL for the runner group's repositories
    selectedRepositoryIds List<Number>
    IDs of the repositories which should be added to the runner group
    selectedWorkflows 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, or private repositories. A value of private 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.
    github logo
    GitHub v6.2.1 published on Thursday, May 23, 2024 by Pulumi