mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-05-08 17:03:57 +02:00
fix(repository_deploy_keys): Make deploy keys compatible to bitbucket-dc-lts
For some reason this api does return ints, where it is supposed to return strings in older LTS versions.
This commit is contained in:
@@ -14,7 +14,7 @@ data "bitbucketserver_project_hooks" "main" {
|
||||
# "name" = "Reject Force Push",
|
||||
# "type" = "PRE_RECEIVE",
|
||||
# "description" = "Reject all force pushes (git push --force) to this repository",
|
||||
# "version" = "8.5.4",
|
||||
# "version" = "9.4.2",
|
||||
# "scope_types" = ["PROJECT", "REPOSITORY"],
|
||||
# "enabled" = "false",
|
||||
# "configured" = "false",
|
||||
@@ -46,7 +46,7 @@ data "bitbucketserver_project_hooks" "main" {
|
||||
* `name` - Name of the hook e.g. `Reject Force Push`
|
||||
* `type` - Type of the hook e.g. `PRE_RECEIVE`
|
||||
* `description` - Detailed description e.g. `Reject all force pushes (git push --force) to this repository`
|
||||
* `version` - Version of the hook, for system hooks this is the bitbucket version e.g. `8.5.4`
|
||||
* `version` - Version of the hook, for system hooks this is the bitbucket version e.g. `9.4.2`
|
||||
* `scope_types` - List of strings containing the scopes available for this hook, e.g. `["PROJECT", "REPOSITORY"]`
|
||||
* `enabled` - Set if this hook is enabled for this project
|
||||
* `configured` - Set if the hook is configured for this project
|
||||
|
||||
@@ -15,7 +15,7 @@ data "bitbucketserver_repository_hooks" "main" {
|
||||
# "name" = "Reject Force Push",
|
||||
# "type" = "PRE_RECEIVE",
|
||||
# "description" = "Reject all force pushes (git push --force) to this repository",
|
||||
# "version" = "8.5.4",
|
||||
# "version" = "9.4.2",
|
||||
# "scope_types" = ["PROJECT", "REPOSITORY"],
|
||||
# "enabled" = "false",
|
||||
# "configured" = "false",
|
||||
@@ -49,7 +49,7 @@ data "bitbucketserver_project_hooks" "main" {
|
||||
* `name` - Name of the hook e.g. `Reject Force Push`
|
||||
* `type` - Type of the hook e.g. `PRE_RECEIVE`
|
||||
* `description` - Detailed description e.g. `Reject all force pushes (git push --force) to this repository`
|
||||
* `version` - Version of the hook, for system hooks this is the bitbucket version e.g. `8.5.4`
|
||||
* `version` - Version of the hook, for system hooks this is the bitbucket version e.g. `9.4.2`
|
||||
* `scope_types` - List of strings containing the scopes available for this hook, e.g. `["PROJECT", "REPOSITORY"]`
|
||||
* `enabled` - Set if this hook is enabled for this project
|
||||
* `configured` - Set if the hook is configured for this project
|
||||
|
||||
32
docs/resources/bitbucketserver_repository_access_token.md
Normal file
32
docs/resources/bitbucketserver_repository_access_token.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Resource: bitbucketserver_user_access_token
|
||||
|
||||
Repository access tokens can be used to authenticate using the Bitbucket Server REST API over Token auth.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```hcl
|
||||
resource "bitbucketserver_repository_access_token" "test" {
|
||||
project = bitbucketserver_project.test.key
|
||||
repository = bitbucketserver_repository.test.slug
|
||||
name = "newLabelForTest"
|
||||
permissions = ["REPO_READ"]
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
* `project` - Required. Project for the repository.
|
||||
* `repository` - Required. Slug for the repository.
|
||||
* `name` - Required. Name of the access token.
|
||||
* `permissions` - Required. List of permissions to grant the access token.
|
||||
* `REPO_READ`
|
||||
* `REPO_WRITE`
|
||||
* `REPO_ADMIN`
|
||||
|
||||
## Attribute Reference
|
||||
|
||||
* `token` - The generated access token. Only available if token was generated on Terraform resource creation, not import/update.
|
||||
|
||||
## Import
|
||||
|
||||
Currently not supported
|
||||
33
docs/resources/bitbucketserver_repository_deploy_key.md
Normal file
33
docs/resources/bitbucketserver_repository_deploy_key.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Resource: bitbucketserver_user_access_token
|
||||
|
||||
Repository access tokens can be used to authenticate using the Bitbucket Server REST API over Token auth.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```hcl
|
||||
resource "bitbucketserver_repository_deploy_key" "test" {
|
||||
project = bitbucketserver_project.test.key
|
||||
repository = bitbucketserver_repository.test.slug
|
||||
label = "newLabelForTest"
|
||||
key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQD1F2KTOi8ptpqkXdcARgYy27uWRCav1isJUB3Hz59MDM6CSAXa+HCgUNDV+6gXQ1eR24nr1Efb7AkEM8LmvMkNlQqpAsPEPxVlndA0KSRLXb3mWruJzkZtrJo1HhVDffuKnevPLFkB75wyBX3jn1FNtc2qfc2i80mu8TfviZnOPYnrRa8B2S9Q8IlUtXAyihQ1G3fn5r5nxrw3QQGrD3cckB9nCZpzAPn6hlDHVk6n5efoWAUxM5AhKln0OLsA1HwjGJN7/dbDPu1nSLuiJSAISSSg4E4SNdfnr3FOhTA79AKNzsor2/EXdbG+f+S4op3s3wtt05zwkHLXRSqKYoT31RFiV9d1XIav+dGTvXCgc6DNG6rbogE6ZbugDZXdcHOAoNs7IUDFbtI/HGKS7CStxAUEchoxM8HDYXmhYt1kUEpmP3g2ckILHGoGPEkOCYGPqx5HbDvAXAJVk3DdSOibCckR2FK2qEoCbMgnPUX84CqNJPHBZ24AaE8htE6TKr0= user@somewhere"
|
||||
permission = "REPO_READ"
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
* `project` - Required. Project for the repository.
|
||||
* `repository` - Required. Slug for the repository.
|
||||
* `label` - Required. Name of the deploy key token.
|
||||
* `key` - Required. The public key to grant access to
|
||||
* `permissions` - Required. List of permissions to grant the access token.
|
||||
* `REPO_READ`
|
||||
* `REPO_WRITE`
|
||||
* `REPO_ADMIN`
|
||||
* expiry_days - Optional. Set if the key should expire. 0 means "does not expire" and is the default
|
||||
|
||||
## Attribute Reference
|
||||
|
||||
## Import
|
||||
|
||||
Currently not supported
|
||||
Reference in New Issue
Block a user