gitlab.Runner
Explore with Pulumi AI
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.
Constructor 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Runner resource accepts the following input properties:
- Registration
Token string - The registration token used to register the runner.
- Access
Level 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.
- 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 List<string> - List of runner’s tags.
- Registration
Token string - The registration token used to register the runner.
- Access
Level 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.
- 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 []string - List of runner’s tags.
- registration
Token String - The registration token used to register the runner.
- access
Level 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.
- maximum
Timeout Integer - Maximum timeout set when this runner handles the job.
- paused Boolean
- Whether the runner should ignore new jobs.
- run
Untagged Boolean - Whether the runner should handle untagged jobs.
- tag
Lists List<String> - List of runner’s tags.
- registration
Token string - The registration token used to register the runner.
- access
Level 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.
- maximum
Timeout number - Maximum timeout set when this runner handles the job.
- paused boolean
- Whether the runner should ignore new jobs.
- run
Untagged boolean - Whether the runner should handle untagged jobs.
- tag
Lists 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.
- registration
Token String - The registration token used to register the runner.
- access
Level 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.
- maximum
Timeout Number - Maximum timeout set when this runner handles the job.
- paused Boolean
- Whether the runner should ignore new jobs.
- run
Untagged Boolean - Whether the runner should handle untagged jobs.
- tag
Lists 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:
- Authentication
Token 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 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 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 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.
- authentication
Token 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.
- Access
Level string - The access_level of the runner. Valid values are:
not_protected
,ref_protected
. - Authentication
Token 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.
- Maximum
Timeout int - Maximum timeout set when this runner handles the job.
- Paused bool
- Whether the runner should ignore new jobs.
- Registration
Token string - The registration token used to register the runner.
- Run
Untagged 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.
- Tag
Lists List<string> - List of runner’s tags.
- Access
Level string - The access_level of the runner. Valid values are:
not_protected
,ref_protected
. - Authentication
Token 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.
- Maximum
Timeout int - Maximum timeout set when this runner handles the job.
- Paused bool
- Whether the runner should ignore new jobs.
- Registration
Token string - The registration token used to register the runner.
- Run
Untagged 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.
- Tag
Lists []string - List of runner’s tags.
- access
Level String - The access_level of the runner. Valid values are:
not_protected
,ref_protected
. - authentication
Token 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.
- maximum
Timeout Integer - Maximum timeout set when this runner handles the job.
- paused Boolean
- Whether the runner should ignore new jobs.
- registration
Token String - The registration token used to register the runner.
- run
Untagged 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.
- tag
Lists List<String> - List of runner’s tags.
- access
Level string - The access_level of the runner. Valid values are:
not_protected
,ref_protected
. - authentication
Token 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.
- maximum
Timeout number - Maximum timeout set when this runner handles the job.
- paused boolean
- Whether the runner should ignore new jobs.
- registration
Token string - The registration token used to register the runner.
- run
Untagged 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.
- tag
Lists 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.
- access
Level String - The access_level of the runner. Valid values are:
not_protected
,ref_protected
. - authentication
Token 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.
- maximum
Timeout Number - Maximum timeout set when this runner handles the job.
- paused Boolean
- Whether the runner should ignore new jobs.
- registration
Token String - The registration token used to register the runner.
- run
Untagged 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.
- tag
Lists 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.