mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-01-15 08:14:14 +01:00
1.4 KiB
1.4 KiB
Resource: bitbucketserver_user_access_token
Personal access tokens can be used to replace passwords over https, or to authenticate using the Bitbucket Server REST API over Basic Auth.
For git operations, you can use your personal access token as a substitute for your password.
Note: You can only create access tokens for your user account - i.e. the one that the provisioner has been configured to authenticate with! This is a restriction in the Bitbucket APIs.
Example Usage
resource "bitbucketserver_user_access_token" "token" {
user = "admin"
name = "my-token"
permissions = ["REPO_READ", "PROJECT_ADMIN"]
}
Argument Reference
-
user- Required. Username of the user. -
name- Required. Name of the access token. -
permissions- Required. List of permissions to grant the access token.PROJECT_READPROJECT_WRITEPROJECT_ADMINREPO_READREPO_WRITEREPO_ADMIN
Attribute Reference
access_token- The generated access token. Only available if token was generated on Terraform resource creation, not import/update.created_date- When the access token was generated.last_authenticated- When the access token was last used for authentication.
Import
Import a user token reference via the token id.
terraform import bitbucketserver_user_access_token.test 413460754380