gitlab.ProjectAccessToken
Explore with Pulumi AI
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_configuration
to automatically rotate tokens instead of usingtimestamp()
as timestamp will cause changes with every plan.pulumi up
must 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/v8/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,
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",
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"),
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")
.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",
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",
expiresAt: "string",
name: "string",
rotationConfiguration: {
expirationDays: 0,
rotateBeforeDays: 0,
},
});
type: gitlab:ProjectAccessToken
properties:
accessLevel: 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
- Access
Level string - The access level for the project access token. Valid values are:
no one
,minimal
,guest
,reporter
,developer
,maintainer
,owner
. Default ismaintainer
. - Expires
At string - When the token will expire, YYYY-MM-DD format. Is automatically set when
rotation_configuration
is used. - Name string
- The name of the project access token.
- Rotation
Configuration 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 up
is 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
- Access
Level string - The access level for the project access token. Valid values are:
no one
,minimal
,guest
,reporter
,developer
,maintainer
,owner
. Default ismaintainer
. - Expires
At string - When the token will expire, YYYY-MM-DD format. Is automatically set when
rotation_configuration
is used. - Name string
- 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 up
is 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
- access
Level String - The access level for the project access token. Valid values are:
no one
,minimal
,guest
,reporter
,developer
,maintainer
,owner
. Default ismaintainer
. - expires
At String - When the token will expire, YYYY-MM-DD format. Is automatically set when
rotation_configuration
is used. - name String
- The name of the project access token.
- rotation
Configuration ProjectAccess Token Rotation Configuration - The configuration for when to rotate a token automatically. Will not rotate a token until
pulumi up
is 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
- access
Level string - The access level for the project access token. Valid values are:
no one
,minimal
,guest
,reporter
,developer
,maintainer
,owner
. Default ismaintainer
. - expires
At string - When the token will expire, YYYY-MM-DD format. Is automatically set when
rotation_configuration
is used. - name string
- The name of the project access token.
- rotation
Configuration ProjectAccess Token Rotation Configuration - The configuration for when to rotate a token automatically. Will not rotate a token until
pulumi up
is 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
- access_
level str - The access level for the project access token. Valid values are:
no one
,minimal
,guest
,reporter
,developer
,maintainer
,owner
. Default ismaintainer
. - expires_
at str - When the token will expire, YYYY-MM-DD format. Is automatically set when
rotation_configuration
is 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 up
is 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
- access
Level String - The access level for the project access token. Valid values are:
no one
,minimal
,guest
,reporter
,developer
,maintainer
,owner
. Default ismaintainer
. - expires
At String - When the token will expire, YYYY-MM-DD format. Is automatically set when
rotation_configuration
is used. - name String
- The name of the project access token.
- rotation
Configuration Property Map - The configuration for when to rotate a token automatically. Will not rotate a token until
pulumi up
is 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.
- Created
At 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.
- User
Id int - The user_id associated to the token.
- Active bool
- True if the token is active.
- Created
At 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.
- User
Id int - The user_id associated to the token.
- active Boolean
- True if the token is active.
- created
At 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.
- user
Id Integer - The user_id associated to the token.
- active boolean
- True if the token is active.
- created
At 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.
- user
Id 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.
- created
At 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.
- user
Id 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,
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) -> ProjectAccessToken
func 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)
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 for the project access token. Valid values are:
no one
,minimal
,guest
,reporter
,developer
,maintainer
,owner
. Default ismaintainer
. - Active bool
- True if the token is active.
- Created
At string - Time the token has been created, RFC3339 format.
- Expires
At string - When the token will expire, YYYY-MM-DD format. Is automatically set when
rotation_configuration
is 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.
- Rotation
Configuration 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 up
is 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
- Token string
- 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.
- Access
Level string - The access level for the project access token. Valid values are:
no one
,minimal
,guest
,reporter
,developer
,maintainer
,owner
. Default ismaintainer
. - Active bool
- True if the token is active.
- Created
At string - Time the token has been created, RFC3339 format.
- Expires
At string - When the token will expire, YYYY-MM-DD format. Is automatically set when
rotation_configuration
is 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.
- Rotation
Configuration ProjectAccess Token Rotation Configuration Args - The configuration for when to rotate a token automatically. Will not rotate a token until
pulumi up
is 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
- Token string
- 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.
- access
Level String - The access level for the project access token. Valid values are:
no one
,minimal
,guest
,reporter
,developer
,maintainer
,owner
. Default ismaintainer
. - active Boolean
- True if the token is active.
- created
At String - Time the token has been created, RFC3339 format.
- expires
At String - When the token will expire, YYYY-MM-DD format. Is automatically set when
rotation_configuration
is 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.
- rotation
Configuration ProjectAccess Token Rotation Configuration - The configuration for when to rotate a token automatically. Will not rotate a token until
pulumi up
is 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
- token String
- The token of the project access token. Note: the token is not available for imported resources.
- user
Id Integer - The user_id associated to the token.
- access
Level string - The access level for the project access token. Valid values are:
no one
,minimal
,guest
,reporter
,developer
,maintainer
,owner
. Default ismaintainer
. - active boolean
- True if the token is active.
- created
At string - Time the token has been created, RFC3339 format.
- expires
At string - When the token will expire, YYYY-MM-DD format. Is automatically set when
rotation_configuration
is 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.
- rotation
Configuration ProjectAccess Token Rotation Configuration - The configuration for when to rotate a token automatically. Will not rotate a token until
pulumi up
is 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
- token string
- The token of the project access token. Note: the token is not available for imported resources.
- user
Id 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
,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.
- expires_
at str - When the token will expire, YYYY-MM-DD format. Is automatically set when
rotation_configuration
is 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 up
is 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
- 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.
- access
Level String - The access level for the project access token. Valid values are:
no one
,minimal
,guest
,reporter
,developer
,maintainer
,owner
. Default ismaintainer
. - active Boolean
- True if the token is active.
- created
At String - Time the token has been created, RFC3339 format.
- expires
At String - When the token will expire, YYYY-MM-DD format. Is automatically set when
rotation_configuration
is 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.
- rotation
Configuration Property Map - The configuration for when to rotate a token automatically. Will not rotate a token until
pulumi up
is 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
- token String
- The token of the project access token. Note: the token is not available for imported resources.
- user
Id Number - The user_id associated to the token.
Supporting Types
ProjectAccessTokenRotationConfiguration, ProjectAccessTokenRotationConfigurationArgs
- 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 up
is 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 up
is run in that timeframe.
- expiration
Days Integer - The duration (in days) the new token should be valid for.
- rotate
Before 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 up
is run in that timeframe.
- expiration
Days number - The duration (in days) the new token should be valid for.
- rotate
Before 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 up
is 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 up
is run in that timeframe.
- expiration
Days Number - The duration (in days) the new token should be valid for.
- rotate
Before 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 up
is run in that timeframe.
Import
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
gitlab
Terraform Provider.