1. Packages
  2. Gitlab Provider
  3. API Docs
  4. UserRunner
GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi

gitlab.UserRunner

Explore with Pulumi AI

The gitlab.UserRunner resource allows creating a GitLab runner using the new GitLab Runner Registration Flow.

Upstream API: GitLab REST API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

// Create a project runner
const projectRunner = new gitlab.UserRunner("project_runner", {
    runnerType: "project_type",
    projectId: 123456,
    description: "A runner created using a user access token instead of a registration token",
    tagLists: [
        "a-tag",
        "other-tag",
    ],
    untagged: true,
});
// Create a group runner
const groupRunner = new gitlab.UserRunner("group_runner", {
    runnerType: "group_type",
    groupId: 123456,
});
// Create a instance runner
const instanceRunner = new gitlab.UserRunner("instance_runner", {runnerType: "instance_type"});
const configToml = pulumi.interpolate`concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "my_gitlab_runner"
  url = "https://example.gitlab.com"
  token = "${groupRunner.token}"
  executor = "docker"

  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "ubuntu"
    privileged = true
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache", "/certs/client"]
    shm_size = 0
`;
Copy
import pulumi
import pulumi_gitlab as gitlab

# Create a project runner
project_runner = gitlab.UserRunner("project_runner",
    runner_type="project_type",
    project_id=123456,
    description="A runner created using a user access token instead of a registration token",
    tag_lists=[
        "a-tag",
        "other-tag",
    ],
    untagged=True)
# Create a group runner
group_runner = gitlab.UserRunner("group_runner",
    runner_type="group_type",
    group_id=123456)
# Create a instance runner
instance_runner = gitlab.UserRunner("instance_runner", runner_type="instance_type")
config_toml = group_runner.token.apply(lambda token: f"""concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "my_gitlab_runner"
  url = "https://example.gitlab.com"
  token = "{token}"
  executor = "docker"

  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "ubuntu"
    privileged = true
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache", "/certs/client"]
    shm_size = 0
""")
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a project runner
		_, err := gitlab.NewUserRunner(ctx, "project_runner", &gitlab.UserRunnerArgs{
			RunnerType:  pulumi.String("project_type"),
			ProjectId:   pulumi.Int(123456),
			Description: pulumi.String("A runner created using a user access token instead of a registration token"),
			TagLists: pulumi.StringArray{
				pulumi.String("a-tag"),
				pulumi.String("other-tag"),
			},
			Untagged: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		// Create a group runner
		groupRunner, err := gitlab.NewUserRunner(ctx, "group_runner", &gitlab.UserRunnerArgs{
			RunnerType: pulumi.String("group_type"),
			GroupId:    pulumi.Int(123456),
		})
		if err != nil {
			return err
		}
		// Create a instance runner
		_, err = gitlab.NewUserRunner(ctx, "instance_runner", &gitlab.UserRunnerArgs{
			RunnerType: pulumi.String("instance_type"),
		})
		if err != nil {
			return err
		}
		_ = groupRunner.Token.ApplyT(func(token string) (string, error) {
			return fmt.Sprintf(`concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "my_gitlab_runner"
  url = "https://example.gitlab.com"
  token = "%v"
  executor = "docker"

  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "ubuntu"
    privileged = true
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache", "/certs/client"]
    shm_size = 0
`, token), nil
		}).(pulumi.StringOutput)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;

return await Deployment.RunAsync(() => 
{
    // Create a project runner
    var projectRunner = new GitLab.UserRunner("project_runner", new()
    {
        RunnerType = "project_type",
        ProjectId = 123456,
        Description = "A runner created using a user access token instead of a registration token",
        TagLists = new[]
        {
            "a-tag",
            "other-tag",
        },
        Untagged = true,
    });

    // Create a group runner
    var groupRunner = new GitLab.UserRunner("group_runner", new()
    {
        RunnerType = "group_type",
        GroupId = 123456,
    });

    // Create a instance runner
    var instanceRunner = new GitLab.UserRunner("instance_runner", new()
    {
        RunnerType = "instance_type",
    });

    var configToml = groupRunner.Token.Apply(token => @$"concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = ""my_gitlab_runner""
  url = ""https://example.gitlab.com""
  token = ""{token}""
  executor = ""docker""

  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = ""ubuntu""
    privileged = true
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = [""/cache"", ""/certs/client""]
    shm_size = 0
");

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.UserRunner;
import com.pulumi.gitlab.UserRunnerArgs;
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) {
        // Create a project runner
        var projectRunner = new UserRunner("projectRunner", UserRunnerArgs.builder()
            .runnerType("project_type")
            .projectId(123456)
            .description("A runner created using a user access token instead of a registration token")
            .tagLists(            
                "a-tag",
                "other-tag")
            .untagged(true)
            .build());

        // Create a group runner
        var groupRunner = new UserRunner("groupRunner", UserRunnerArgs.builder()
            .runnerType("group_type")
            .groupId(123456)
            .build());

        // Create a instance runner
        var instanceRunner = new UserRunner("instanceRunner", UserRunnerArgs.builder()
            .runnerType("instance_type")
            .build());

        final var configToml = groupRunner.token().applyValue(token -> """
concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "my_gitlab_runner"
  url = "https://example.gitlab.com"
  token = "%s"
  executor = "docker"

  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "ubuntu"
    privileged = true
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache", "/certs/client"]
    shm_size = 0
", token));

    }
}
Copy
resources:
  # Create a project runner
  projectRunner:
    type: gitlab:UserRunner
    name: project_runner
    properties:
      runnerType: project_type
      projectId: 123456
      description: A runner created using a user access token instead of a registration token
      tagLists:
        - a-tag
        - other-tag
      untagged: true
  # Create a group runner
  groupRunner:
    type: gitlab:UserRunner
    name: group_runner
    properties:
      runnerType: group_type
      groupId: 123456 # populate other attributes...
  # Create a instance runner
  instanceRunner:
    type: gitlab:UserRunner
    name: instance_runner
    properties:
      runnerType: instance_type
variables:
  configToml: |
    concurrent = 1
    check_interval = 0

    [session_server]
      session_timeout = 1800

    [[runners]]
      name = "my_gitlab_runner"
      url = "https://example.gitlab.com"
      token = "${groupRunner.token}"
      executor = "docker"

      [runners.custom_build_dir]
      [runners.cache]
        [runners.cache.s3]
        [runners.cache.gcs]
        [runners.cache.azure]
      [runners.docker]
        tls_verify = false
        image = "ubuntu"
        privileged = true
        disable_entrypoint_overwrite = false
        oom_kill_disable = false
        disable_cache = false
        volumes = ["/cache", "/certs/client"]
        shm_size = 0    
Copy

Create UserRunner Resource

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

Constructor syntax

new UserRunner(name: string, args: UserRunnerArgs, opts?: CustomResourceOptions);
@overload
def UserRunner(resource_name: str,
               args: UserRunnerArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def UserRunner(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               runner_type: Optional[str] = None,
               access_level: Optional[str] = None,
               description: Optional[str] = None,
               group_id: Optional[int] = None,
               locked: Optional[bool] = None,
               maintenance_note: Optional[str] = None,
               maximum_timeout: Optional[int] = None,
               paused: Optional[bool] = None,
               project_id: Optional[int] = None,
               tag_lists: Optional[Sequence[str]] = None,
               untagged: Optional[bool] = None)
func NewUserRunner(ctx *Context, name string, args UserRunnerArgs, opts ...ResourceOption) (*UserRunner, error)
public UserRunner(string name, UserRunnerArgs args, CustomResourceOptions? opts = null)
public UserRunner(String name, UserRunnerArgs args)
public UserRunner(String name, UserRunnerArgs args, CustomResourceOptions options)
type: gitlab:UserRunner
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. UserRunnerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. UserRunnerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. UserRunnerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. UserRunnerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. UserRunnerArgs
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 userRunnerResource = new GitLab.UserRunner("userRunnerResource", new()
{
    RunnerType = "string",
    AccessLevel = "string",
    Description = "string",
    GroupId = 0,
    Locked = false,
    MaintenanceNote = "string",
    MaximumTimeout = 0,
    Paused = false,
    ProjectId = 0,
    TagLists = new[]
    {
        "string",
    },
    Untagged = false,
});
Copy
example, err := gitlab.NewUserRunner(ctx, "userRunnerResource", &gitlab.UserRunnerArgs{
	RunnerType:      pulumi.String("string"),
	AccessLevel:     pulumi.String("string"),
	Description:     pulumi.String("string"),
	GroupId:         pulumi.Int(0),
	Locked:          pulumi.Bool(false),
	MaintenanceNote: pulumi.String("string"),
	MaximumTimeout:  pulumi.Int(0),
	Paused:          pulumi.Bool(false),
	ProjectId:       pulumi.Int(0),
	TagLists: pulumi.StringArray{
		pulumi.String("string"),
	},
	Untagged: pulumi.Bool(false),
})
Copy
var userRunnerResource = new UserRunner("userRunnerResource", UserRunnerArgs.builder()
    .runnerType("string")
    .accessLevel("string")
    .description("string")
    .groupId(0)
    .locked(false)
    .maintenanceNote("string")
    .maximumTimeout(0)
    .paused(false)
    .projectId(0)
    .tagLists("string")
    .untagged(false)
    .build());
Copy
user_runner_resource = gitlab.UserRunner("userRunnerResource",
    runner_type="string",
    access_level="string",
    description="string",
    group_id=0,
    locked=False,
    maintenance_note="string",
    maximum_timeout=0,
    paused=False,
    project_id=0,
    tag_lists=["string"],
    untagged=False)
Copy
const userRunnerResource = new gitlab.UserRunner("userRunnerResource", {
    runnerType: "string",
    accessLevel: "string",
    description: "string",
    groupId: 0,
    locked: false,
    maintenanceNote: "string",
    maximumTimeout: 0,
    paused: false,
    projectId: 0,
    tagLists: ["string"],
    untagged: false,
});
Copy
type: gitlab:UserRunner
properties:
    accessLevel: string
    description: string
    groupId: 0
    locked: false
    maintenanceNote: string
    maximumTimeout: 0
    paused: false
    projectId: 0
    runnerType: string
    tagLists:
        - string
    untagged: false
Copy

UserRunner Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The UserRunner resource accepts the following input properties:

RunnerType This property is required. string
The scope of the runner. Valid values are: instance_type, group_type, project_type.
AccessLevel string
The access level of the runner. Valid values are: not_protected, ref_protected.
Description string
Description of the runner.
GroupId int
The ID of the group that the runner is created in. Required if runnertype is grouptype.
Locked bool
Specifies if the runner should be locked for the current project.
MaintenanceNote string
Free-form maintenance notes for the runner (1024 characters)
MaximumTimeout int
Maximum timeout that limits the amount of time (in seconds) that runners can run jobs. Must be at least 600 (10 minutes).
Paused bool
Specifies if the runner should ignore new jobs.
ProjectId int
The ID of the project that the runner is created in. Required if runnertype is projecttype.
TagLists List<string>
A list of runner tags.
Untagged bool
Specifies if the runner should handle untagged jobs.
RunnerType This property is required. string
The scope of the runner. Valid values are: instance_type, group_type, project_type.
AccessLevel string
The access level of the runner. Valid values are: not_protected, ref_protected.
Description string
Description of the runner.
GroupId int
The ID of the group that the runner is created in. Required if runnertype is grouptype.
Locked bool
Specifies if the runner should be locked for the current project.
MaintenanceNote string
Free-form maintenance notes for the runner (1024 characters)
MaximumTimeout int
Maximum timeout that limits the amount of time (in seconds) that runners can run jobs. Must be at least 600 (10 minutes).
Paused bool
Specifies if the runner should ignore new jobs.
ProjectId int
The ID of the project that the runner is created in. Required if runnertype is projecttype.
TagLists []string
A list of runner tags.
Untagged bool
Specifies if the runner should handle untagged jobs.
runnerType This property is required. String
The scope of the runner. Valid values are: instance_type, group_type, project_type.
accessLevel String
The access level of the runner. Valid values are: not_protected, ref_protected.
description String
Description of the runner.
groupId Integer
The ID of the group that the runner is created in. Required if runnertype is grouptype.
locked Boolean
Specifies if the runner should be locked for the current project.
maintenanceNote String
Free-form maintenance notes for the runner (1024 characters)
maximumTimeout Integer
Maximum timeout that limits the amount of time (in seconds) that runners can run jobs. Must be at least 600 (10 minutes).
paused Boolean
Specifies if the runner should ignore new jobs.
projectId Integer
The ID of the project that the runner is created in. Required if runnertype is projecttype.
tagLists List<String>
A list of runner tags.
untagged Boolean
Specifies if the runner should handle untagged jobs.
runnerType This property is required. string
The scope of the runner. Valid values are: instance_type, group_type, project_type.
accessLevel string
The access level of the runner. Valid values are: not_protected, ref_protected.
description string
Description of the runner.
groupId number
The ID of the group that the runner is created in. Required if runnertype is grouptype.
locked boolean
Specifies if the runner should be locked for the current project.
maintenanceNote string
Free-form maintenance notes for the runner (1024 characters)
maximumTimeout number
Maximum timeout that limits the amount of time (in seconds) that runners can run jobs. Must be at least 600 (10 minutes).
paused boolean
Specifies if the runner should ignore new jobs.
projectId number
The ID of the project that the runner is created in. Required if runnertype is projecttype.
tagLists string[]
A list of runner tags.
untagged boolean
Specifies if the runner should handle untagged jobs.
runner_type This property is required. str
The scope of the runner. Valid values are: instance_type, group_type, project_type.
access_level str
The access level of the runner. Valid values are: not_protected, ref_protected.
description str
Description of the runner.
group_id int
The ID of the group that the runner is created in. Required if runnertype is grouptype.
locked bool
Specifies if the runner should be locked for the current project.
maintenance_note str
Free-form maintenance notes for the runner (1024 characters)
maximum_timeout int
Maximum timeout that limits the amount of time (in seconds) that runners can run jobs. Must be at least 600 (10 minutes).
paused bool
Specifies if the runner should ignore new jobs.
project_id int
The ID of the project that the runner is created in. Required if runnertype is projecttype.
tag_lists Sequence[str]
A list of runner tags.
untagged bool
Specifies if the runner should handle untagged jobs.
runnerType This property is required. String
The scope of the runner. Valid values are: instance_type, group_type, project_type.
accessLevel String
The access level of the runner. Valid values are: not_protected, ref_protected.
description String
Description of the runner.
groupId Number
The ID of the group that the runner is created in. Required if runnertype is grouptype.
locked Boolean
Specifies if the runner should be locked for the current project.
maintenanceNote String
Free-form maintenance notes for the runner (1024 characters)
maximumTimeout Number
Maximum timeout that limits the amount of time (in seconds) that runners can run jobs. Must be at least 600 (10 minutes).
paused Boolean
Specifies if the runner should ignore new jobs.
projectId Number
The ID of the project that the runner is created in. Required if runnertype is projecttype.
tagLists List<String>
A list of runner tags.
untagged Boolean
Specifies if the runner should handle untagged jobs.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Token string
The authentication token to use when setting up a new runner with this configuration. This value cannot be imported.
Id string
The provider-assigned unique ID for this managed resource.
Token string
The authentication token to use when setting up a new runner with this configuration. This value cannot be imported.
id String
The provider-assigned unique ID for this managed resource.
token String
The authentication token to use when setting up a new runner with this configuration. This value cannot be imported.
id string
The provider-assigned unique ID for this managed resource.
token string
The authentication token to use when setting up a new runner with this configuration. This value cannot be imported.
id str
The provider-assigned unique ID for this managed resource.
token str
The authentication token to use when setting up a new runner with this configuration. This value cannot be imported.
id String
The provider-assigned unique ID for this managed resource.
token String
The authentication token to use when setting up a new runner with this configuration. This value cannot be imported.

Look up Existing UserRunner Resource

Get an existing UserRunner 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?: UserRunnerState, opts?: CustomResourceOptions): UserRunner
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_level: Optional[str] = None,
        description: Optional[str] = None,
        group_id: Optional[int] = None,
        locked: Optional[bool] = None,
        maintenance_note: Optional[str] = None,
        maximum_timeout: Optional[int] = None,
        paused: Optional[bool] = None,
        project_id: Optional[int] = None,
        runner_type: Optional[str] = None,
        tag_lists: Optional[Sequence[str]] = None,
        token: Optional[str] = None,
        untagged: Optional[bool] = None) -> UserRunner
func GetUserRunner(ctx *Context, name string, id IDInput, state *UserRunnerState, opts ...ResourceOption) (*UserRunner, error)
public static UserRunner Get(string name, Input<string> id, UserRunnerState? state, CustomResourceOptions? opts = null)
public static UserRunner get(String name, Output<String> id, UserRunnerState state, CustomResourceOptions options)
resources:  _:    type: gitlab:UserRunner    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
Description string
Description of the runner.
GroupId int
The ID of the group that the runner is created in. Required if runnertype is grouptype.
Locked bool
Specifies if the runner should be locked for the current project.
MaintenanceNote string
Free-form maintenance notes for the runner (1024 characters)
MaximumTimeout int
Maximum timeout that limits the amount of time (in seconds) that runners can run jobs. Must be at least 600 (10 minutes).
Paused bool
Specifies if the runner should ignore new jobs.
ProjectId int
The ID of the project that the runner is created in. Required if runnertype is projecttype.
RunnerType string
The scope of the runner. Valid values are: instance_type, group_type, project_type.
TagLists List<string>
A list of runner tags.
Token string
The authentication token to use when setting up a new runner with this configuration. This value cannot be imported.
Untagged bool
Specifies if the runner should handle untagged jobs.
AccessLevel string
The access level of the runner. Valid values are: not_protected, ref_protected.
Description string
Description of the runner.
GroupId int
The ID of the group that the runner is created in. Required if runnertype is grouptype.
Locked bool
Specifies if the runner should be locked for the current project.
MaintenanceNote string
Free-form maintenance notes for the runner (1024 characters)
MaximumTimeout int
Maximum timeout that limits the amount of time (in seconds) that runners can run jobs. Must be at least 600 (10 minutes).
Paused bool
Specifies if the runner should ignore new jobs.
ProjectId int
The ID of the project that the runner is created in. Required if runnertype is projecttype.
RunnerType string
The scope of the runner. Valid values are: instance_type, group_type, project_type.
TagLists []string
A list of runner tags.
Token string
The authentication token to use when setting up a new runner with this configuration. This value cannot be imported.
Untagged bool
Specifies if the runner should handle untagged jobs.
accessLevel String
The access level of the runner. Valid values are: not_protected, ref_protected.
description String
Description of the runner.
groupId Integer
The ID of the group that the runner is created in. Required if runnertype is grouptype.
locked Boolean
Specifies if the runner should be locked for the current project.
maintenanceNote String
Free-form maintenance notes for the runner (1024 characters)
maximumTimeout Integer
Maximum timeout that limits the amount of time (in seconds) that runners can run jobs. Must be at least 600 (10 minutes).
paused Boolean
Specifies if the runner should ignore new jobs.
projectId Integer
The ID of the project that the runner is created in. Required if runnertype is projecttype.
runnerType String
The scope of the runner. Valid values are: instance_type, group_type, project_type.
tagLists List<String>
A list of runner tags.
token String
The authentication token to use when setting up a new runner with this configuration. This value cannot be imported.
untagged Boolean
Specifies if the runner should handle untagged jobs.
accessLevel string
The access level of the runner. Valid values are: not_protected, ref_protected.
description string
Description of the runner.
groupId number
The ID of the group that the runner is created in. Required if runnertype is grouptype.
locked boolean
Specifies if the runner should be locked for the current project.
maintenanceNote string
Free-form maintenance notes for the runner (1024 characters)
maximumTimeout number
Maximum timeout that limits the amount of time (in seconds) that runners can run jobs. Must be at least 600 (10 minutes).
paused boolean
Specifies if the runner should ignore new jobs.
projectId number
The ID of the project that the runner is created in. Required if runnertype is projecttype.
runnerType string
The scope of the runner. Valid values are: instance_type, group_type, project_type.
tagLists string[]
A list of runner tags.
token string
The authentication token to use when setting up a new runner with this configuration. This value cannot be imported.
untagged boolean
Specifies if the runner should handle untagged jobs.
access_level str
The access level of the runner. Valid values are: not_protected, ref_protected.
description str
Description of the runner.
group_id int
The ID of the group that the runner is created in. Required if runnertype is grouptype.
locked bool
Specifies if the runner should be locked for the current project.
maintenance_note str
Free-form maintenance notes for the runner (1024 characters)
maximum_timeout int
Maximum timeout that limits the amount of time (in seconds) that runners can run jobs. Must be at least 600 (10 minutes).
paused bool
Specifies if the runner should ignore new jobs.
project_id int
The ID of the project that the runner is created in. Required if runnertype is projecttype.
runner_type str
The scope of the runner. Valid values are: instance_type, group_type, project_type.
tag_lists Sequence[str]
A list of runner tags.
token str
The authentication token to use when setting up a new runner with this configuration. This value cannot be imported.
untagged bool
Specifies if the runner should handle untagged jobs.
accessLevel String
The access level of the runner. Valid values are: not_protected, ref_protected.
description String
Description of the runner.
groupId Number
The ID of the group that the runner is created in. Required if runnertype is grouptype.
locked Boolean
Specifies if the runner should be locked for the current project.
maintenanceNote String
Free-form maintenance notes for the runner (1024 characters)
maximumTimeout Number
Maximum timeout that limits the amount of time (in seconds) that runners can run jobs. Must be at least 600 (10 minutes).
paused Boolean
Specifies if the runner should ignore new jobs.
projectId Number
The ID of the project that the runner is created in. Required if runnertype is projecttype.
runnerType String
The scope of the runner. Valid values are: instance_type, group_type, project_type.
tagLists List<String>
A list of runner tags.
token String
The authentication token to use when setting up a new runner with this configuration. This value cannot be imported.
untagged Boolean
Specifies if the runner should handle untagged jobs.

Import

Starting in Terraform v1.5.0 you can use an import block to import gitlab_user_runner. For example:

terraform

import {

to = gitlab_user_runner.example

id = “see CLI command below for ID”

}

Import using the CLI is supported using the following syntax:

You can import a gitlab runner using its ID

Note: Importing a runner will not provide access to the token attribute

$ pulumi import gitlab:index/userRunner:UserRunner example 12345
Copy

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.