GitLab

Pulumi Official
Package maintained by Pulumi
v4.7.0 published on Thursday, Mar 31, 2022 by Pulumi

DeployToken

The gitlab.DeployToken resource allows to manage the lifecycle of group and project deploy tokens.

Upstream API: GitLab REST API docs

Create a DeployToken Resource

new DeployToken(name: string, args: DeployTokenArgs, opts?: CustomResourceOptions);
@overload
def DeployToken(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                expires_at: Optional[str] = None,
                group: Optional[str] = None,
                name: Optional[str] = None,
                project: Optional[str] = None,
                scopes: Optional[Sequence[str]] = None,
                username: Optional[str] = None)
@overload
def DeployToken(resource_name: str,
                args: DeployTokenArgs,
                opts: Optional[ResourceOptions] = None)
func NewDeployToken(ctx *Context, name string, args DeployTokenArgs, opts ...ResourceOption) (*DeployToken, error)
public DeployToken(string name, DeployTokenArgs args, CustomResourceOptions? opts = null)
public DeployToken(String name, DeployTokenArgs args)
public DeployToken(String name, DeployTokenArgs args, CustomResourceOptions options)
type: gitlab:DeployToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DeployTokenArgs
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 DeployTokenArgs
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 DeployTokenArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DeployTokenArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DeployTokenArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Scopes List<string>

Valid values: read_repository, read_registry, read_package_registry, write_registry, write_package_registry.

ExpiresAt string

Time the token will expire it, RFC3339 format. Will not expire per default.

Group string

The name or id of the group to add the deploy token to.

Name string

A name to describe the deploy token with.

Project string

The name or id of the project to add the deploy token to.

Username string

A username for the deploy token. Default is gitlab+deploy-token-{n}.

Scopes []string

Valid values: read_repository, read_registry, read_package_registry, write_registry, write_package_registry.

ExpiresAt string

Time the token will expire it, RFC3339 format. Will not expire per default.

Group string

The name or id of the group to add the deploy token to.

Name string

A name to describe the deploy token with.

Project string

The name or id of the project to add the deploy token to.

Username string

A username for the deploy token. Default is gitlab+deploy-token-{n}.

scopes List<String>

Valid values: read_repository, read_registry, read_package_registry, write_registry, write_package_registry.

expiresAt String

Time the token will expire it, RFC3339 format. Will not expire per default.

group String

The name or id of the group to add the deploy token to.

name String

A name to describe the deploy token with.

project String

The name or id of the project to add the deploy token to.

username String

A username for the deploy token. Default is gitlab+deploy-token-{n}.

scopes string[]

Valid values: read_repository, read_registry, read_package_registry, write_registry, write_package_registry.

expiresAt string

Time the token will expire it, RFC3339 format. Will not expire per default.

group string

The name or id of the group to add the deploy token to.

name string

A name to describe the deploy token with.

project string

The name or id of the project to add the deploy token to.

username string

A username for the deploy token. Default is gitlab+deploy-token-{n}.

scopes Sequence[str]

Valid values: read_repository, read_registry, read_package_registry, write_registry, write_package_registry.

expires_at str

Time the token will expire it, RFC3339 format. Will not expire per default.

group str

The name or id of the group to add the deploy token to.

name str

A name to describe the deploy token with.

project str

The name or id of the project to add the deploy token to.

username str

A username for the deploy token. Default is gitlab+deploy-token-{n}.

scopes List<String>

Valid values: read_repository, read_registry, read_package_registry, write_registry, write_package_registry.

expiresAt String

Time the token will expire it, RFC3339 format. Will not expire per default.

group String

The name or id of the group to add the deploy token to.

name String

A name to describe the deploy token with.

project String

The name or id of the project to add the deploy token to.

username String

A username for the deploy token. Default is gitlab+deploy-token-{n}.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Token string

The secret token. This is only populated when creating a new deploy token. Note: The token is not available for imported resources.

Id string

The provider-assigned unique ID for this managed resource.

Token string

The secret token. This is only populated when creating a new deploy token. Note: The token is not available for imported resources.

id String

The provider-assigned unique ID for this managed resource.

token String

The secret token. This is only populated when creating a new deploy token. Note: The token is not available for imported resources.

id string

The provider-assigned unique ID for this managed resource.

token string

The secret token. This is only populated when creating a new deploy token. Note: The token is not available for imported resources.

id str

The provider-assigned unique ID for this managed resource.

token str

The secret token. This is only populated when creating a new deploy token. Note: The token is not available for imported resources.

id String

The provider-assigned unique ID for this managed resource.

token String

The secret token. This is only populated when creating a new deploy token. Note: The token is not available for imported resources.

Look up an Existing DeployToken Resource

Get an existing DeployToken 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?: DeployTokenState, opts?: CustomResourceOptions): DeployToken
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        expires_at: Optional[str] = None,
        group: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        scopes: Optional[Sequence[str]] = None,
        token: Optional[str] = None,
        username: Optional[str] = None) -> DeployToken
func GetDeployToken(ctx *Context, name string, id IDInput, state *DeployTokenState, opts ...ResourceOption) (*DeployToken, error)
public static DeployToken Get(string name, Input<string> id, DeployTokenState? state, CustomResourceOptions? opts = null)
public static DeployToken get(String name, Output<String> id, DeployTokenState 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:
ExpiresAt string

Time the token will expire it, RFC3339 format. Will not expire per default.

Group string

The name or id of the group to add the deploy token to.

Name string

A name to describe the deploy token with.

Project string

The name or id of the project to add the deploy token to.

Scopes List<string>

Valid values: read_repository, read_registry, read_package_registry, write_registry, write_package_registry.

Token string

The secret token. This is only populated when creating a new deploy token. Note: The token is not available for imported resources.

Username string

A username for the deploy token. Default is gitlab+deploy-token-{n}.

ExpiresAt string

Time the token will expire it, RFC3339 format. Will not expire per default.

Group string

The name or id of the group to add the deploy token to.

Name string

A name to describe the deploy token with.

Project string

The name or id of the project to add the deploy token to.

Scopes []string

Valid values: read_repository, read_registry, read_package_registry, write_registry, write_package_registry.

Token string

The secret token. This is only populated when creating a new deploy token. Note: The token is not available for imported resources.

Username string

A username for the deploy token. Default is gitlab+deploy-token-{n}.

expiresAt String

Time the token will expire it, RFC3339 format. Will not expire per default.

group String

The name or id of the group to add the deploy token to.

name String

A name to describe the deploy token with.

project String

The name or id of the project to add the deploy token to.

scopes List<String>

Valid values: read_repository, read_registry, read_package_registry, write_registry, write_package_registry.

token String

The secret token. This is only populated when creating a new deploy token. Note: The token is not available for imported resources.

username String

A username for the deploy token. Default is gitlab+deploy-token-{n}.

expiresAt string

Time the token will expire it, RFC3339 format. Will not expire per default.

group string

The name or id of the group to add the deploy token to.

name string

A name to describe the deploy token with.

project string

The name or id of the project to add the deploy token to.

scopes string[]

Valid values: read_repository, read_registry, read_package_registry, write_registry, write_package_registry.

token string

The secret token. This is only populated when creating a new deploy token. Note: The token is not available for imported resources.

username string

A username for the deploy token. Default is gitlab+deploy-token-{n}.

expires_at str

Time the token will expire it, RFC3339 format. Will not expire per default.

group str

The name or id of the group to add the deploy token to.

name str

A name to describe the deploy token with.

project str

The name or id of the project to add the deploy token to.

scopes Sequence[str]

Valid values: read_repository, read_registry, read_package_registry, write_registry, write_package_registry.

token str

The secret token. This is only populated when creating a new deploy token. Note: The token is not available for imported resources.

username str

A username for the deploy token. Default is gitlab+deploy-token-{n}.

expiresAt String

Time the token will expire it, RFC3339 format. Will not expire per default.

group String

The name or id of the group to add the deploy token to.

name String

A name to describe the deploy token with.

project String

The name or id of the project to add the deploy token to.

scopes List<String>

Valid values: read_repository, read_registry, read_package_registry, write_registry, write_package_registry.

token String

The secret token. This is only populated when creating a new deploy token. Note: The token is not available for imported resources.

username String

A username for the deploy token. Default is gitlab+deploy-token-{n}.

Import

GitLab deploy tokens can be imported using an id made up of {type}:{type_id}:{deploy_token_id}, where type is one ofproject, group.

 $ pulumi import gitlab:index/deployToken:DeployToken group_token group:1:3
 $ pulumi import gitlab:index/deployToken:DeployToken project_token project:1:4

Notethe token resource attribute is not available for imported resources as this information cannot be read from the GitLab API.

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes

This Pulumi package is based on the gitlab Terraform Provider.