gitlab.ProjectAccessToken
The gitlab.ProjectAccessToken resource allows to manage the lifecycle of a project access token.
Observability scopes are in beta and may not work on all instances. See more details in the documentation
Use
rotation_configurationto automatically rotate tokens instead of usingtimestamp()as timestamp will cause changes with every plan.pulumi upmust still be run to rotate the token.
Due to Automatic reuse detection it’s possible that a new Project Access Token will immediately be revoked. Check if an old process using the old token is running if this happens.
Upstream API: GitLab API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = new gitlab.ProjectAccessToken("example", {
    project: "25",
    name: "Example project access token",
    expiresAt: "2020-03-14",
    accessLevel: "reporter",
    scopes: ["api"],
});
const exampleProjectVariable = new gitlab.ProjectVariable("example", {
    project: exampleGitlabProject.id,
    key: "pat",
    value: example.token,
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.ProjectAccessToken("example",
    project="25",
    name="Example project access token",
    expires_at="2020-03-14",
    access_level="reporter",
    scopes=["api"])
example_project_variable = gitlab.ProjectVariable("example",
    project=example_gitlab_project["id"],
    key="pat",
    value=example.token)
package main
import (
	"github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := gitlab.NewProjectAccessToken(ctx, "example", &gitlab.ProjectAccessTokenArgs{
			Project:     pulumi.String("25"),
			Name:        pulumi.String("Example project access token"),
			ExpiresAt:   pulumi.String("2020-03-14"),
			AccessLevel: pulumi.String("reporter"),
			Scopes: pulumi.StringArray{
				pulumi.String("api"),
			},
		})
		if err != nil {
			return err
		}
		_, err = gitlab.NewProjectVariable(ctx, "example", &gitlab.ProjectVariableArgs{
			Project: pulumi.Any(exampleGitlabProject.Id),
			Key:     pulumi.String("pat"),
			Value:   example.Token,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() => 
{
    var example = new GitLab.ProjectAccessToken("example", new()
    {
        Project = "25",
        Name = "Example project access token",
        ExpiresAt = "2020-03-14",
        AccessLevel = "reporter",
        Scopes = new[]
        {
            "api",
        },
    });
    var exampleProjectVariable = new GitLab.ProjectVariable("example", new()
    {
        Project = exampleGitlabProject.Id,
        Key = "pat",
        Value = example.Token,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.ProjectAccessToken;
import com.pulumi.gitlab.ProjectAccessTokenArgs;
import com.pulumi.gitlab.ProjectVariable;
import com.pulumi.gitlab.ProjectVariableArgs;
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 ProjectAccessToken("example", ProjectAccessTokenArgs.builder()
            .project("25")
            .name("Example project access token")
            .expiresAt("2020-03-14")
            .accessLevel("reporter")
            .scopes("api")
            .build());
        var exampleProjectVariable = new ProjectVariable("exampleProjectVariable", ProjectVariableArgs.builder()
            .project(exampleGitlabProject.id())
            .key("pat")
            .value(example.token())
            .build());
    }
}
resources:
  example:
    type: gitlab:ProjectAccessToken
    properties:
      project: '25'
      name: Example project access token
      expiresAt: 2020-03-14
      accessLevel: reporter
      scopes:
        - api
  exampleProjectVariable:
    type: gitlab:ProjectVariable
    name: example
    properties:
      project: ${exampleGitlabProject.id}
      key: pat
      value: ${example.token}
Create ProjectAccessToken Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectAccessToken(name: string, args: ProjectAccessTokenArgs, opts?: CustomResourceOptions);@overload
def ProjectAccessToken(resource_name: str,
                       args: ProjectAccessTokenArgs,
                       opts: Optional[ResourceOptions] = None)
@overload
def ProjectAccessToken(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       project: Optional[str] = None,
                       scopes: Optional[Sequence[str]] = None,
                       access_level: Optional[str] = None,
                       description: Optional[str] = None,
                       expires_at: Optional[str] = None,
                       name: Optional[str] = None,
                       rotation_configuration: Optional[ProjectAccessTokenRotationConfigurationArgs] = None)func NewProjectAccessToken(ctx *Context, name string, args ProjectAccessTokenArgs, opts ...ResourceOption) (*ProjectAccessToken, error)public ProjectAccessToken(string name, ProjectAccessTokenArgs args, CustomResourceOptions? opts = null)
public ProjectAccessToken(String name, ProjectAccessTokenArgs args)
public ProjectAccessToken(String name, ProjectAccessTokenArgs args, CustomResourceOptions options)
type: gitlab:ProjectAccessToken
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 ProjectAccessTokenArgs
- 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 ProjectAccessTokenArgs
- 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 ProjectAccessTokenArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectAccessTokenArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectAccessTokenArgs
- 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 projectAccessTokenResource = new GitLab.ProjectAccessToken("projectAccessTokenResource", new()
{
    Project = "string",
    Scopes = new[]
    {
        "string",
    },
    AccessLevel = "string",
    Description = "string",
    ExpiresAt = "string",
    Name = "string",
    RotationConfiguration = new GitLab.Inputs.ProjectAccessTokenRotationConfigurationArgs
    {
        ExpirationDays = 0,
        RotateBeforeDays = 0,
    },
});
example, err := gitlab.NewProjectAccessToken(ctx, "projectAccessTokenResource", &gitlab.ProjectAccessTokenArgs{
	Project: pulumi.String("string"),
	Scopes: pulumi.StringArray{
		pulumi.String("string"),
	},
	AccessLevel: pulumi.String("string"),
	Description: pulumi.String("string"),
	ExpiresAt:   pulumi.String("string"),
	Name:        pulumi.String("string"),
	RotationConfiguration: &gitlab.ProjectAccessTokenRotationConfigurationArgs{
		ExpirationDays:   pulumi.Int(0),
		RotateBeforeDays: pulumi.Int(0),
	},
})
var projectAccessTokenResource = new ProjectAccessToken("projectAccessTokenResource", ProjectAccessTokenArgs.builder()
    .project("string")
    .scopes("string")
    .accessLevel("string")
    .description("string")
    .expiresAt("string")
    .name("string")
    .rotationConfiguration(ProjectAccessTokenRotationConfigurationArgs.builder()
        .expirationDays(0)
        .rotateBeforeDays(0)
        .build())
    .build());
project_access_token_resource = gitlab.ProjectAccessToken("projectAccessTokenResource",
    project="string",
    scopes=["string"],
    access_level="string",
    description="string",
    expires_at="string",
    name="string",
    rotation_configuration={
        "expiration_days": 0,
        "rotate_before_days": 0,
    })
const projectAccessTokenResource = new gitlab.ProjectAccessToken("projectAccessTokenResource", {
    project: "string",
    scopes: ["string"],
    accessLevel: "string",
    description: "string",
    expiresAt: "string",
    name: "string",
    rotationConfiguration: {
        expirationDays: 0,
        rotateBeforeDays: 0,
    },
});
type: gitlab:ProjectAccessToken
properties:
    accessLevel: string
    description: string
    expiresAt: string
    name: string
    project: string
    rotationConfiguration:
        expirationDays: 0
        rotateBeforeDays: 0
    scopes:
        - string
ProjectAccessToken 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 ProjectAccessToken resource accepts the following input properties:
- Project string
- The ID or full path of the project.
- Scopes List<string>
- The scopes of the project access token. valid values are: api,read_api,read_registry,write_registry,read_repository,write_repository,create_runner,manage_runner,ai_features,k8s_proxy,read_observability,write_observability,self_rotate
- AccessLevel string
- The access level for the project access token. Valid values are: no one,minimal,guest,planner,reporter,developer,maintainer,owner. Default ismaintainer.
- Description string
- The description of the project access token.
- ExpiresAt string
- When the token will expire, YYYY-MM-DD format. Is automatically set when rotation_configurationis used.
- Name string
- The name of the project access token.
- RotationConfiguration Pulumi.Git Lab. Inputs. Project Access Token Rotation Configuration 
- The configuration for when to rotate a token automatically. Will not rotate a token until pulumi upis run.
- Project string
- The ID or full path of the project.
- Scopes []string
- The scopes of the project access token. valid values are: api,read_api,read_registry,write_registry,read_repository,write_repository,create_runner,manage_runner,ai_features,k8s_proxy,read_observability,write_observability,self_rotate
- AccessLevel string
- The access level for the project access token. Valid values are: no one,minimal,guest,planner,reporter,developer,maintainer,owner. Default ismaintainer.
- Description string
- The description of the project access token.
- ExpiresAt string
- When the token will expire, YYYY-MM-DD format. Is automatically set when rotation_configurationis used.
- Name string
- The name of the project access token.
- RotationConfiguration ProjectAccess Token Rotation Configuration Args 
- The configuration for when to rotate a token automatically. Will not rotate a token until pulumi upis run.
- project String
- The ID or full path of the project.
- scopes List<String>
- The scopes of the project access token. valid values are: api,read_api,read_registry,write_registry,read_repository,write_repository,create_runner,manage_runner,ai_features,k8s_proxy,read_observability,write_observability,self_rotate
- accessLevel String
- The access level for the project access token. Valid values are: no one,minimal,guest,planner,reporter,developer,maintainer,owner. Default ismaintainer.
- description String
- The description of the project access token.
- expiresAt String
- When the token will expire, YYYY-MM-DD format. Is automatically set when rotation_configurationis used.
- name String
- The name of the project access token.
- rotationConfiguration ProjectAccess Token Rotation Configuration 
- The configuration for when to rotate a token automatically. Will not rotate a token until pulumi upis run.
- project string
- The ID or full path of the project.
- scopes string[]
- The scopes of the project access token. valid values are: api,read_api,read_registry,write_registry,read_repository,write_repository,create_runner,manage_runner,ai_features,k8s_proxy,read_observability,write_observability,self_rotate
- accessLevel string
- The access level for the project access token. Valid values are: no one,minimal,guest,planner,reporter,developer,maintainer,owner. Default ismaintainer.
- description string
- The description of the project access token.
- expiresAt string
- When the token will expire, YYYY-MM-DD format. Is automatically set when rotation_configurationis used.
- name string
- The name of the project access token.
- rotationConfiguration ProjectAccess Token Rotation Configuration 
- The configuration for when to rotate a token automatically. Will not rotate a token until pulumi upis run.
- project str
- The ID or full path of the project.
- scopes Sequence[str]
- The scopes of the project access token. valid values are: api,read_api,read_registry,write_registry,read_repository,write_repository,create_runner,manage_runner,ai_features,k8s_proxy,read_observability,write_observability,self_rotate
- access_level str
- The access level for the project access token. Valid values are: no one,minimal,guest,planner,reporter,developer,maintainer,owner. Default ismaintainer.
- description str
- The description of the project access token.
- expires_at str
- When the token will expire, YYYY-MM-DD format. Is automatically set when rotation_configurationis used.
- name str
- The name of the project access token.
- rotation_configuration ProjectAccess Token Rotation Configuration Args 
- The configuration for when to rotate a token automatically. Will not rotate a token until pulumi upis run.
- project String
- The ID or full path of the project.
- scopes List<String>
- The scopes of the project access token. valid values are: api,read_api,read_registry,write_registry,read_repository,write_repository,create_runner,manage_runner,ai_features,k8s_proxy,read_observability,write_observability,self_rotate
- accessLevel String
- The access level for the project access token. Valid values are: no one,minimal,guest,planner,reporter,developer,maintainer,owner. Default ismaintainer.
- description String
- The description of the project access token.
- expiresAt String
- When the token will expire, YYYY-MM-DD format. Is automatically set when rotation_configurationis used.
- name String
- The name of the project access token.
- rotationConfiguration Property Map
- The configuration for when to rotate a token automatically. Will not rotate a token until pulumi upis run.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectAccessToken resource produces the following output properties:
- Active bool
- True if the token is active.
- CreatedAt string
- Time the token has been created, RFC3339 format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Revoked bool
- True if the token is revoked.
- Token string
- The token of the project access token. Note: the token is not available for imported resources.
- UserId int
- The user_id associated to the token.
- Active bool
- True if the token is active.
- CreatedAt string
- Time the token has been created, RFC3339 format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Revoked bool
- True if the token is revoked.
- Token string
- The token of the project access token. Note: the token is not available for imported resources.
- UserId int
- The user_id associated to the token.
- active Boolean
- True if the token is active.
- createdAt String
- Time the token has been created, RFC3339 format.
- id String
- The provider-assigned unique ID for this managed resource.
- revoked Boolean
- True if the token is revoked.
- token String
- The token of the project access token. Note: the token is not available for imported resources.
- userId Integer
- The user_id associated to the token.
- active boolean
- True if the token is active.
- createdAt string
- Time the token has been created, RFC3339 format.
- id string
- The provider-assigned unique ID for this managed resource.
- revoked boolean
- True if the token is revoked.
- token string
- The token of the project access token. Note: the token is not available for imported resources.
- userId number
- The user_id associated to the token.
- active bool
- True if the token is active.
- created_at str
- Time the token has been created, RFC3339 format.
- id str
- The provider-assigned unique ID for this managed resource.
- revoked bool
- True if the token is revoked.
- token str
- The token of the project access token. Note: the token is not available for imported resources.
- user_id int
- The user_id associated to the token.
- active Boolean
- True if the token is active.
- createdAt String
- Time the token has been created, RFC3339 format.
- id String
- The provider-assigned unique ID for this managed resource.
- revoked Boolean
- True if the token is revoked.
- token String
- The token of the project access token. Note: the token is not available for imported resources.
- userId Number
- The user_id associated to the token.
Look up Existing ProjectAccessToken Resource
Get an existing ProjectAccessToken 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?: ProjectAccessTokenState, opts?: CustomResourceOptions): ProjectAccessToken@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_level: Optional[str] = None,
        active: Optional[bool] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        expires_at: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        revoked: Optional[bool] = None,
        rotation_configuration: Optional[ProjectAccessTokenRotationConfigurationArgs] = None,
        scopes: Optional[Sequence[str]] = None,
        token: Optional[str] = None,
        user_id: Optional[int] = None) -> ProjectAccessTokenfunc GetProjectAccessToken(ctx *Context, name string, id IDInput, state *ProjectAccessTokenState, opts ...ResourceOption) (*ProjectAccessToken, error)public static ProjectAccessToken Get(string name, Input<string> id, ProjectAccessTokenState? state, CustomResourceOptions? opts = null)public static ProjectAccessToken get(String name, Output<String> id, ProjectAccessTokenState state, CustomResourceOptions options)resources:  _:    type: gitlab:ProjectAccessToken    get:      id: ${id}- 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.
- AccessLevel string
- The access level for the project access token. Valid values are: no one,minimal,guest,planner,reporter,developer,maintainer,owner. Default ismaintainer.
- Active bool
- True if the token is active.
- CreatedAt string
- Time the token has been created, RFC3339 format.
- Description string
- The description of the project access token.
- ExpiresAt string
- When the token will expire, YYYY-MM-DD format. Is automatically set when rotation_configurationis used.
- Name string
- The name of the project access token.
- Project string
- The ID or full path of the project.
- Revoked bool
- True if the token is revoked.
- RotationConfiguration Pulumi.Git Lab. Inputs. Project Access Token Rotation Configuration 
- The configuration for when to rotate a token automatically. Will not rotate a token until pulumi upis run.
- Scopes List<string>
- The scopes of the project access token. valid values are: api,read_api,read_registry,write_registry,read_repository,write_repository,create_runner,manage_runner,ai_features,k8s_proxy,read_observability,write_observability,self_rotate
- Token string
- The token of the project access token. Note: the token is not available for imported resources.
- UserId int
- The user_id associated to the token.
- AccessLevel string
- The access level for the project access token. Valid values are: no one,minimal,guest,planner,reporter,developer,maintainer,owner. Default ismaintainer.
- Active bool
- True if the token is active.
- CreatedAt string
- Time the token has been created, RFC3339 format.
- Description string
- The description of the project access token.
- ExpiresAt string
- When the token will expire, YYYY-MM-DD format. Is automatically set when rotation_configurationis used.
- Name string
- The name of the project access token.
- Project string
- The ID or full path of the project.
- Revoked bool
- True if the token is revoked.
- RotationConfiguration ProjectAccess Token Rotation Configuration Args 
- The configuration for when to rotate a token automatically. Will not rotate a token until pulumi upis run.
- Scopes []string
- The scopes of the project access token. valid values are: api,read_api,read_registry,write_registry,read_repository,write_repository,create_runner,manage_runner,ai_features,k8s_proxy,read_observability,write_observability,self_rotate
- Token string
- The token of the project access token. Note: the token is not available for imported resources.
- UserId int
- The user_id associated to the token.
- accessLevel String
- The access level for the project access token. Valid values are: no one,minimal,guest,planner,reporter,developer,maintainer,owner. Default ismaintainer.
- active Boolean
- True if the token is active.
- createdAt String
- Time the token has been created, RFC3339 format.
- description String
- The description of the project access token.
- expiresAt String
- When the token will expire, YYYY-MM-DD format. Is automatically set when rotation_configurationis used.
- name String
- The name of the project access token.
- project String
- The ID or full path of the project.
- revoked Boolean
- True if the token is revoked.
- rotationConfiguration ProjectAccess Token Rotation Configuration 
- The configuration for when to rotate a token automatically. Will not rotate a token until pulumi upis run.
- scopes List<String>
- The scopes of the project access token. valid values are: api,read_api,read_registry,write_registry,read_repository,write_repository,create_runner,manage_runner,ai_features,k8s_proxy,read_observability,write_observability,self_rotate
- token String
- The token of the project access token. Note: the token is not available for imported resources.
- userId Integer
- The user_id associated to the token.
- accessLevel string
- The access level for the project access token. Valid values are: no one,minimal,guest,planner,reporter,developer,maintainer,owner. Default ismaintainer.
- active boolean
- True if the token is active.
- createdAt string
- Time the token has been created, RFC3339 format.
- description string
- The description of the project access token.
- expiresAt string
- When the token will expire, YYYY-MM-DD format. Is automatically set when rotation_configurationis used.
- name string
- The name of the project access token.
- project string
- The ID or full path of the project.
- revoked boolean
- True if the token is revoked.
- rotationConfiguration ProjectAccess Token Rotation Configuration 
- The configuration for when to rotate a token automatically. Will not rotate a token until pulumi upis run.
- scopes string[]
- The scopes of the project access token. valid values are: api,read_api,read_registry,write_registry,read_repository,write_repository,create_runner,manage_runner,ai_features,k8s_proxy,read_observability,write_observability,self_rotate
- token string
- The token of the project access token. Note: the token is not available for imported resources.
- userId number
- The user_id associated to the token.
- access_level str
- The access level for the project access token. Valid values are: no one,minimal,guest,planner,reporter,developer,maintainer,owner. Default ismaintainer.
- active bool
- True if the token is active.
- created_at str
- Time the token has been created, RFC3339 format.
- description str
- The description of the project access token.
- expires_at str
- When the token will expire, YYYY-MM-DD format. Is automatically set when rotation_configurationis used.
- name str
- The name of the project access token.
- project str
- The ID or full path of the project.
- revoked bool
- True if the token is revoked.
- rotation_configuration ProjectAccess Token Rotation Configuration Args 
- The configuration for when to rotate a token automatically. Will not rotate a token until pulumi upis run.
- scopes Sequence[str]
- The scopes of the project access token. valid values are: api,read_api,read_registry,write_registry,read_repository,write_repository,create_runner,manage_runner,ai_features,k8s_proxy,read_observability,write_observability,self_rotate
- token str
- The token of the project access token. Note: the token is not available for imported resources.
- user_id int
- The user_id associated to the token.
- accessLevel String
- The access level for the project access token. Valid values are: no one,minimal,guest,planner,reporter,developer,maintainer,owner. Default ismaintainer.
- active Boolean
- True if the token is active.
- createdAt String
- Time the token has been created, RFC3339 format.
- description String
- The description of the project access token.
- expiresAt String
- When the token will expire, YYYY-MM-DD format. Is automatically set when rotation_configurationis used.
- name String
- The name of the project access token.
- project String
- The ID or full path of the project.
- revoked Boolean
- True if the token is revoked.
- rotationConfiguration Property Map
- The configuration for when to rotate a token automatically. Will not rotate a token until pulumi upis run.
- scopes List<String>
- The scopes of the project access token. valid values are: api,read_api,read_registry,write_registry,read_repository,write_repository,create_runner,manage_runner,ai_features,k8s_proxy,read_observability,write_observability,self_rotate
- token String
- The token of the project access token. Note: the token is not available for imported resources.
- userId Number
- The user_id associated to the token.
Supporting Types
ProjectAccessTokenRotationConfiguration, ProjectAccessTokenRotationConfigurationArgs          
- ExpirationDays int
- The duration (in days) the new token should be valid for.
- RotateBefore intDays 
- The duration (in days) before the expiration when the token should be rotated. As an example, if set to 7 days, the token will rotate 7 days before the expiration date, but only when pulumi upis run in that timeframe.
- ExpirationDays int
- The duration (in days) the new token should be valid for.
- RotateBefore intDays 
- The duration (in days) before the expiration when the token should be rotated. As an example, if set to 7 days, the token will rotate 7 days before the expiration date, but only when pulumi upis run in that timeframe.
- expirationDays Integer
- The duration (in days) the new token should be valid for.
- rotateBefore IntegerDays 
- The duration (in days) before the expiration when the token should be rotated. As an example, if set to 7 days, the token will rotate 7 days before the expiration date, but only when pulumi upis run in that timeframe.
- expirationDays number
- The duration (in days) the new token should be valid for.
- rotateBefore numberDays 
- The duration (in days) before the expiration when the token should be rotated. As an example, if set to 7 days, the token will rotate 7 days before the expiration date, but only when pulumi upis run in that timeframe.
- expiration_days int
- The duration (in days) the new token should be valid for.
- rotate_before_ intdays 
- The duration (in days) before the expiration when the token should be rotated. As an example, if set to 7 days, the token will rotate 7 days before the expiration date, but only when pulumi upis run in that timeframe.
- expirationDays Number
- The duration (in days) the new token should be valid for.
- rotateBefore NumberDays 
- The duration (in days) before the expiration when the token should be rotated. As an example, if set to 7 days, the token will rotate 7 days before the expiration date, but only when pulumi upis run in that timeframe.
Import
Starting in Terraform v1.5.0, you can use an import block to import gitlab_project_access_token. For example:
terraform
import {
to = gitlab_project_access_token.example
id = “see CLI command below for ID”
}
Importing using the CLI is supported with the following syntax:
A GitLab Project Access Token can be imported using a key composed of <project-id>:<token-id>, e.g.
$ pulumi import gitlab:index/projectAccessToken:ProjectAccessToken example "12345:1"
NOTE: the token resource attribute is not available for imported resources as this information cannot be read from the GitLab API.
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 gitlabTerraform Provider.
