1. Packages
  2. GitLab
  3. API Docs
  4. Runner
GitLab v8.0.0 published on Thursday, May 30, 2024 by Pulumi

gitlab.Runner

Explore with Pulumi AI

gitlab logo
GitLab v8.0.0 published on Thursday, May 30, 2024 by Pulumi

    The gitlab.Runner resource allows to manage the lifecycle of a runner.

    A runner can either be registered at an instance level or group level. The runner will be registered at a group level if the token used is from a group, or at an instance level if the token used is for the instance.

    ~ > Using this resource will register a runner using the deprecated registration_token flow. To use the new authentication_token flow instead, use the gitlab.UserRunner resource!

    Upstream API: GitLab REST API docs

    Create Runner Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Runner(name: string, args: RunnerArgs, opts?: CustomResourceOptions);
    @overload
    def Runner(resource_name: str,
               args: RunnerArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Runner(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               registration_token: Optional[str] = None,
               access_level: Optional[str] = None,
               description: Optional[str] = None,
               locked: Optional[bool] = None,
               maximum_timeout: Optional[int] = None,
               paused: Optional[bool] = None,
               run_untagged: Optional[bool] = None,
               tag_lists: Optional[Sequence[str]] = None)
    func NewRunner(ctx *Context, name string, args RunnerArgs, opts ...ResourceOption) (*Runner, error)
    public Runner(string name, RunnerArgs args, CustomResourceOptions? opts = null)
    public Runner(String name, RunnerArgs args)
    public Runner(String name, RunnerArgs args, CustomResourceOptions options)
    
    type: gitlab:Runner
    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 RunnerArgs
    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 RunnerArgs
    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 RunnerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RunnerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RunnerArgs
    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 runnerResource = new GitLab.Runner("runnerResource", new()
    {
        RegistrationToken = "string",
        AccessLevel = "string",
        Description = "string",
        Locked = false,
        MaximumTimeout = 0,
        Paused = false,
        RunUntagged = false,
        TagLists = new[]
        {
            "string",
        },
    });
    
    example, err := gitlab.NewRunner(ctx, "runnerResource", &gitlab.RunnerArgs{
    	RegistrationToken: pulumi.String("string"),
    	AccessLevel:       pulumi.String("string"),
    	Description:       pulumi.String("string"),
    	Locked:            pulumi.Bool(false),
    	MaximumTimeout:    pulumi.Int(0),
    	Paused:            pulumi.Bool(false),
    	RunUntagged:       pulumi.Bool(false),
    	TagLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var runnerResource = new Runner("runnerResource", RunnerArgs.builder()        
        .registrationToken("string")
        .accessLevel("string")
        .description("string")
        .locked(false)
        .maximumTimeout(0)
        .paused(false)
        .runUntagged(false)
        .tagLists("string")
        .build());
    
    runner_resource = gitlab.Runner("runnerResource",
        registration_token="string",
        access_level="string",
        description="string",
        locked=False,
        maximum_timeout=0,
        paused=False,
        run_untagged=False,
        tag_lists=["string"])
    
    const runnerResource = new gitlab.Runner("runnerResource", {
        registrationToken: "string",
        accessLevel: "string",
        description: "string",
        locked: false,
        maximumTimeout: 0,
        paused: false,
        runUntagged: false,
        tagLists: ["string"],
    });
    
    type: gitlab:Runner
    properties:
        accessLevel: string
        description: string
        locked: false
        maximumTimeout: 0
        paused: false
        registrationToken: string
        runUntagged: false
        tagLists:
            - string
    

    Runner 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 Runner resource accepts the following input properties:

    RegistrationToken string
    The registration token used to register the runner.
    AccessLevel string
    The access_level of the runner. Valid values are: not_protected, ref_protected.
    Description string
    The runner's description.
    Locked bool
    Whether the runner should be locked for current project.
    MaximumTimeout int
    Maximum timeout set when this runner handles the job.
    Paused bool
    Whether the runner should ignore new jobs.
    RunUntagged bool
    Whether the runner should handle untagged jobs.
    TagLists List<string>
    List of runner’s tags.
    RegistrationToken string
    The registration token used to register the runner.
    AccessLevel string
    The access_level of the runner. Valid values are: not_protected, ref_protected.
    Description string
    The runner's description.
    Locked bool
    Whether the runner should be locked for current project.
    MaximumTimeout int
    Maximum timeout set when this runner handles the job.
    Paused bool
    Whether the runner should ignore new jobs.
    RunUntagged bool
    Whether the runner should handle untagged jobs.
    TagLists []string
    List of runner’s tags.
    registrationToken String
    The registration token used to register the runner.
    accessLevel String
    The access_level of the runner. Valid values are: not_protected, ref_protected.
    description String
    The runner's description.
    locked Boolean
    Whether the runner should be locked for current project.
    maximumTimeout Integer
    Maximum timeout set when this runner handles the job.
    paused Boolean
    Whether the runner should ignore new jobs.
    runUntagged Boolean
    Whether the runner should handle untagged jobs.
    tagLists List<String>
    List of runner’s tags.
    registrationToken string
    The registration token used to register the runner.
    accessLevel string
    The access_level of the runner. Valid values are: not_protected, ref_protected.
    description string
    The runner's description.
    locked boolean
    Whether the runner should be locked for current project.
    maximumTimeout number
    Maximum timeout set when this runner handles the job.
    paused boolean
    Whether the runner should ignore new jobs.
    runUntagged boolean
    Whether the runner should handle untagged jobs.
    tagLists string[]
    List of runner’s tags.
    registration_token str
    The registration token used to register the runner.
    access_level str
    The access_level of the runner. Valid values are: not_protected, ref_protected.
    description str
    The runner's description.
    locked bool
    Whether the runner should be locked for current project.
    maximum_timeout int
    Maximum timeout set when this runner handles the job.
    paused bool
    Whether the runner should ignore new jobs.
    run_untagged bool
    Whether the runner should handle untagged jobs.
    tag_lists Sequence[str]
    List of runner’s tags.
    registrationToken String
    The registration token used to register the runner.
    accessLevel String
    The access_level of the runner. Valid values are: not_protected, ref_protected.
    description String
    The runner's description.
    locked Boolean
    Whether the runner should be locked for current project.
    maximumTimeout Number
    Maximum timeout set when this runner handles the job.
    paused Boolean
    Whether the runner should ignore new jobs.
    runUntagged Boolean
    Whether the runner should handle untagged jobs.
    tagLists List<String>
    List of runner’s tags.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Runner resource produces the following output properties:

    AuthenticationToken string
    The authentication token used for building a config.toml file. This value is not present when imported.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of runners to show, one of: online and offline. active and paused are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0.
    AuthenticationToken string
    The authentication token used for building a config.toml file. This value is not present when imported.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of runners to show, one of: online and offline. active and paused are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0.
    authenticationToken String
    The authentication token used for building a config.toml file. This value is not present when imported.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of runners to show, one of: online and offline. active and paused are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0.
    authenticationToken string
    The authentication token used for building a config.toml file. This value is not present when imported.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of runners to show, one of: online and offline. active and paused are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0.
    authentication_token str
    The authentication token used for building a config.toml file. This value is not present when imported.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of runners to show, one of: online and offline. active and paused are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0.
    authenticationToken String
    The authentication token used for building a config.toml file. This value is not present when imported.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of runners to show, one of: online and offline. active and paused are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0.

    Look up Existing Runner Resource

    Get an existing Runner 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?: RunnerState, opts?: CustomResourceOptions): Runner
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_level: Optional[str] = None,
            authentication_token: Optional[str] = None,
            description: Optional[str] = None,
            locked: Optional[bool] = None,
            maximum_timeout: Optional[int] = None,
            paused: Optional[bool] = None,
            registration_token: Optional[str] = None,
            run_untagged: Optional[bool] = None,
            status: Optional[str] = None,
            tag_lists: Optional[Sequence[str]] = None) -> Runner
    func GetRunner(ctx *Context, name string, id IDInput, state *RunnerState, opts ...ResourceOption) (*Runner, error)
    public static Runner Get(string name, Input<string> id, RunnerState? state, CustomResourceOptions? opts = null)
    public static Runner get(String name, Output<String> id, RunnerState 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:
    AccessLevel string
    The access_level of the runner. Valid values are: not_protected, ref_protected.
    AuthenticationToken string
    The authentication token used for building a config.toml file. This value is not present when imported.
    Description string
    The runner's description.
    Locked bool
    Whether the runner should be locked for current project.
    MaximumTimeout int
    Maximum timeout set when this runner handles the job.
    Paused bool
    Whether the runner should ignore new jobs.
    RegistrationToken string
    The registration token used to register the runner.
    RunUntagged bool
    Whether the runner should handle untagged jobs.
    Status string
    The status of runners to show, one of: online and offline. active and paused are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0.
    TagLists List<string>
    List of runner’s tags.
    AccessLevel string
    The access_level of the runner. Valid values are: not_protected, ref_protected.
    AuthenticationToken string
    The authentication token used for building a config.toml file. This value is not present when imported.
    Description string
    The runner's description.
    Locked bool
    Whether the runner should be locked for current project.
    MaximumTimeout int
    Maximum timeout set when this runner handles the job.
    Paused bool
    Whether the runner should ignore new jobs.
    RegistrationToken string
    The registration token used to register the runner.
    RunUntagged bool
    Whether the runner should handle untagged jobs.
    Status string
    The status of runners to show, one of: online and offline. active and paused are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0.
    TagLists []string
    List of runner’s tags.
    accessLevel String
    The access_level of the runner. Valid values are: not_protected, ref_protected.
    authenticationToken String
    The authentication token used for building a config.toml file. This value is not present when imported.
    description String
    The runner's description.
    locked Boolean
    Whether the runner should be locked for current project.
    maximumTimeout Integer
    Maximum timeout set when this runner handles the job.
    paused Boolean
    Whether the runner should ignore new jobs.
    registrationToken String
    The registration token used to register the runner.
    runUntagged Boolean
    Whether the runner should handle untagged jobs.
    status String
    The status of runners to show, one of: online and offline. active and paused are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0.
    tagLists List<String>
    List of runner’s tags.
    accessLevel string
    The access_level of the runner. Valid values are: not_protected, ref_protected.
    authenticationToken string
    The authentication token used for building a config.toml file. This value is not present when imported.
    description string
    The runner's description.
    locked boolean
    Whether the runner should be locked for current project.
    maximumTimeout number
    Maximum timeout set when this runner handles the job.
    paused boolean
    Whether the runner should ignore new jobs.
    registrationToken string
    The registration token used to register the runner.
    runUntagged boolean
    Whether the runner should handle untagged jobs.
    status string
    The status of runners to show, one of: online and offline. active and paused are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0.
    tagLists string[]
    List of runner’s tags.
    access_level str
    The access_level of the runner. Valid values are: not_protected, ref_protected.
    authentication_token str
    The authentication token used for building a config.toml file. This value is not present when imported.
    description str
    The runner's description.
    locked bool
    Whether the runner should be locked for current project.
    maximum_timeout int
    Maximum timeout set when this runner handles the job.
    paused bool
    Whether the runner should ignore new jobs.
    registration_token str
    The registration token used to register the runner.
    run_untagged bool
    Whether the runner should handle untagged jobs.
    status str
    The status of runners to show, one of: online and offline. active and paused are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0.
    tag_lists Sequence[str]
    List of runner’s tags.
    accessLevel String
    The access_level of the runner. Valid values are: not_protected, ref_protected.
    authenticationToken String
    The authentication token used for building a config.toml file. This value is not present when imported.
    description String
    The runner's description.
    locked Boolean
    Whether the runner should be locked for current project.
    maximumTimeout Number
    Maximum timeout set when this runner handles the job.
    paused Boolean
    Whether the runner should ignore new jobs.
    registrationToken String
    The registration token used to register the runner.
    runUntagged Boolean
    Whether the runner should handle untagged jobs.
    status String
    The status of runners to show, one of: online and offline. active and paused are also possible values which were deprecated in GitLab 14.8 and will be removed in GitLab 16.0.
    tagLists List<String>
    List of runner’s tags.

    Import

    A GitLab Runner can be imported using the runner’s ID, eg

    $ pulumi import gitlab:index/runner:Runner this 1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v8.0.0 published on Thursday, May 30, 2024 by Pulumi