mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-03-31 22:43:08 +02:00
Moved all docs to website
This commit is contained in:
373
README.md
373
README.md
@@ -34,378 +34,7 @@ resource "bitbucketserver_repository" "test" {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Provider Configuration
|
See [User Guide](https://gavinbunney.github.io/terraform-provider-bitbucketserver) for details on all the provided data and resource types.
|
||||||
|
|
||||||
The provider supports parameters to determine the bitbucket server and admin user/password to use.
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
provider "bitbucketserver" {
|
|
||||||
server = "https://mybitbucket.example.com"
|
|
||||||
username = "admin"
|
|
||||||
password = "password"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also specify these parameters through the `BITBUCKET_SERVER`, `BITBUCKER_USERNAME` and `BITBUCKET_PASSWORD` environment variables.
|
|
||||||
|
|
||||||
|
|
||||||
### Create a Bitbucket Project
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_project" "test" {
|
|
||||||
key = "TEST"
|
|
||||||
name = "test-01"
|
|
||||||
description = "Test project"
|
|
||||||
avatar = "data:(content type, e.g. image/png);base64,(data)"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `key` - Required. Project key to set.
|
|
||||||
* `name` - Required. Name of the project.
|
|
||||||
* `description` - Optional. Description of the project.
|
|
||||||
* `avatar` - Optional. Avatar to use containing base64-encoded image data. Format: `data:(content type, e.g. image/png);base64,(data)`
|
|
||||||
|
|
||||||
#### Import Project
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_project.test TEST
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Assign Project Permissions for Group
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_project_permissions_group" "test" {
|
|
||||||
project = "TEST"
|
|
||||||
group = "stash-users"
|
|
||||||
permission = "PROJECT_WRITE"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `project` - Required. Project key to set permissions for.
|
|
||||||
* `group` - Required. Name of the group permissions are for.
|
|
||||||
* `permission` - Required. The permission to grant. Available project permissions are: `PROJECT_READ`, `PROJECT_WRITE`, `PROJECT_ADMIN`
|
|
||||||
|
|
||||||
#### Import Group Permission for Project
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_project_permissions_group.test TEST/stash-users
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Assign Project Permissions for User
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_project_permissions_user" "test" {
|
|
||||||
project = "TEST"
|
|
||||||
user = "admin"
|
|
||||||
permission = "PROJECT_WRITE"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `project` - Required. Project key to set permissions for.
|
|
||||||
* `user` - Required. Name of the user permissions are for.
|
|
||||||
* `permission` - Required. The permission to grant. Available project permissions are: `PROJECT_READ`, `PROJECT_WRITE`, `PROJECT_ADMIN`
|
|
||||||
|
|
||||||
#### Import Group Permission for Project
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_project_permissions_user.test TEST/admin
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Create a Bitbucket Repository
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_repository" "test" {
|
|
||||||
name = "test-01"
|
|
||||||
description = "Test repository"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `name` - Required. Name of the project.
|
|
||||||
* `slug` - Optional. Slug to use for the repository. Calculated if not defined.
|
|
||||||
* `description` - Optional. Description of the repository.
|
|
||||||
* `forkable` - Optional. Enable/disable forks of this repository. Default `true`
|
|
||||||
* `public` - Optional. Determine if this repository is public. Default `false`
|
|
||||||
|
|
||||||
#### Attributes
|
|
||||||
|
|
||||||
Additional to the above, the following attributes are emitted:
|
|
||||||
|
|
||||||
* `clone_ssh` - URL for SSH cloning of the repository.
|
|
||||||
* `clone_https` - URL for HTTPS cloning of the repository.
|
|
||||||
|
|
||||||
#### Import Repository
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_repository.test TEST/test-01
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Assign Repository Permissions for Group
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_repository_permissions_group" "test" {
|
|
||||||
project = "TEST"
|
|
||||||
repository = "my-repo"
|
|
||||||
group = "stash-users"
|
|
||||||
permission = "REPO_WRITE"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `project` - Required. Project key to set permissions for.
|
|
||||||
* `repository` - Required. Repository slug to set permissions for.
|
|
||||||
* `group` - Required. Name of the group permissions are for.
|
|
||||||
* `permission` - Required. The permission to grant. Available repository permissions are: `REPO_READ`, `REPO_WRITE`, `REPO_ADMIN`
|
|
||||||
|
|
||||||
#### Import Group Permission for Repository
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_repository_permissions_group.test TEST/my-repo/stash-users
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Assign Repository Permissions for User
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_repository_permissions_user" "test" {
|
|
||||||
project = "TEST"
|
|
||||||
repository = "my-repo"
|
|
||||||
user = "admin"
|
|
||||||
permission = "REPO_WRITE"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `project` - Required. Project key to set permissions for.
|
|
||||||
* `user` - Required. Name of the user permissions are for.
|
|
||||||
* `permission` - Required. The permission to grant. Available repository permissions are: `REPO_READ`, `REPO_WRITE`, `REPO_ADMIN`
|
|
||||||
|
|
||||||
#### Import Group Permission for Repository
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_repository_permissions_user.test TEST/my-repo/admin
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Create a Bitbucket User
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_user" "admin" {
|
|
||||||
name = "mreynolds"
|
|
||||||
display_name = "Malcolm Reynolds"
|
|
||||||
email_address = "browncoat@example.com"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `name` - Required. Username of the user.
|
|
||||||
* `display_name` - Required. User's name to display.
|
|
||||||
* `email_address` - Required. Email address of user.
|
|
||||||
* `password_length` - Optional. The length of the generated password on resource creation. Only applies on resource creation. Default `20`.
|
|
||||||
|
|
||||||
#### Attributes
|
|
||||||
|
|
||||||
Additional to the above, the following attributes are emitted:
|
|
||||||
|
|
||||||
* `initial_password` - The generated user password. Only available if password was handled on Terraform resource creation, not import.
|
|
||||||
|
|
||||||
#### Import User
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_user.test mreynolds
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Create a Bitbucket Group
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_group" "browncoats" {
|
|
||||||
name = "browncoats"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `name` - Required. Group to create.
|
|
||||||
|
|
||||||
#### Import Group
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_group.test browncoats
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Assign a User to a Bitbucket Group
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_user_group" "browncoat" {
|
|
||||||
user = "mreynolds"
|
|
||||||
group = "browncoats"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `user` - Required. User to assign group to.
|
|
||||||
* `group` - Required. Group to assign to the user.
|
|
||||||
|
|
||||||
#### Import Group
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_user_group.browncoat mreynolds/browncoats
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Assign Global Permissions for Group
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_global_permissions_group" "test" {
|
|
||||||
project = "TEST"
|
|
||||||
group = "stash-users"
|
|
||||||
permission = "ADMIN"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `group` - Required. Name of the group permissions are for.
|
|
||||||
* `permission` - Required. The permission to grant. Available project permissions are: `LICENSED_USER`, `PROJECT_CREATE`, `ADMIN`, `SYS_ADMIN`
|
|
||||||
|
|
||||||
#### Import Global Group Permissions
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_global_permissions_group.test my-group
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Assign Global Permissions for User
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_project_permissions_user" "test" {
|
|
||||||
user = "admin"
|
|
||||||
permission = "ADMIN"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `user` - Required. Name of the user permissions are for.
|
|
||||||
* `permission` - Required. The permission to grant. Available project permissions are: `LICENSED_USER`, `PROJECT_CREATE`, `ADMIN`, `SYS_ADMIN`
|
|
||||||
|
|
||||||
#### Import Global Group Permissions
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_global_permissions_user.test my-user
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Install and License Plugins
|
|
||||||
|
|
||||||
Install plugins, manage enabled state and set license details.
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_plugin" "myplugin" {
|
|
||||||
key = "com.example-my-plugin"
|
|
||||||
version = "1.2.3"
|
|
||||||
license = "ABCDEF"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `key` - Required. Unique key of the plugin.
|
|
||||||
* `version` - Required. Version to install.
|
|
||||||
* `license` - Optional. License to apply to the plugin.
|
|
||||||
* `enabled` - Optional, default `true`. Flag to enable/disable the plugin.
|
|
||||||
|
|
||||||
#### Attributes
|
|
||||||
|
|
||||||
Additional to the above, the following attributes are emitted:
|
|
||||||
|
|
||||||
* `enabled_by_default` - Set to `true` if the plugin is enabled by default (for system plugins).
|
|
||||||
* `version` - Installed version of the plugin.
|
|
||||||
* `name` - Name of the plugin.
|
|
||||||
* `description` - Plugin description.
|
|
||||||
* `user_installed` - Set to `true` if this is a user installed plugin vs a system bundled plugin.
|
|
||||||
* `optional` - Set to `true` if this is an optional plugin.
|
|
||||||
* `vendor.name` - Name of the vendor.
|
|
||||||
* `vendor.link` - Vendor homepage.
|
|
||||||
* `vendor.marketplace_link` - Plugin marketplace link.
|
|
||||||
* `applied_license.0.valid` - Is the license valid. true/false.
|
|
||||||
* `applied_license.0.evaluation` - Is the license an evaluation. true/false.
|
|
||||||
* `applied_license.0.nearly_expired` - Is the license nearly expired. true/false.
|
|
||||||
* `applied_license.0.maintenance_expiry_date` - Date of maintenance expiry.
|
|
||||||
* `applied_license.0.maintenance_expired` - Is the maintenance expired. true/false.
|
|
||||||
* `applied_license.0.license_type` - Type of license.
|
|
||||||
* `applied_license.0.expiry_date` - Expiry date of the license.
|
|
||||||
* `applied_license.0.raw_license` - The raw license information.
|
|
||||||
* `applied_license.0.renewable` - Is the license renewabl. true/false.
|
|
||||||
* `applied_license.0.organization_name` - Name of the organization the license is for.
|
|
||||||
* `applied_license.0.enterprise` - Is the license for enterprise. true/false.
|
|
||||||
* `applied_license.0.data_center` - Is the license for data center. true/false.
|
|
||||||
* `applied_license.0.subscription` - Is the license a subscription. true/false.
|
|
||||||
* `applied_license.0.active` - Is the license active. true/false.
|
|
||||||
* `applied_license.0.auto_renewal` - Is the license renewed automatically. true/false.
|
|
||||||
* `applied_license.0.upgradable` - Is the license able to be upgraded. true/false.
|
|
||||||
* `applied_license.0.crossgradeable` - Can the license be crossgraded. true/false.
|
|
||||||
* `applied_license.0.purchase_past_server_cutoff_date` - The purchase date past the server cutoff date. true/false.
|
|
||||||
|
|
||||||
#### Import Plugin
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_plugin.test com.example-my-plugin
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Set Server License
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_license" "main" {
|
|
||||||
license = "AAACLg0ODAoPeNqNVEtv4jAQvudXRNpbp"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `license` - Required. License to apply.
|
|
||||||
|
|
||||||
#### Attributes
|
|
||||||
|
|
||||||
Additional to the above, the following attributes are emitted:
|
|
||||||
|
|
||||||
* `clone_ssh` - URL for SSH cloning of the repository.
|
|
||||||
* `clone_https` - URL for HTTPS cloning of the repository.
|
|
||||||
* `creation_date` - License creation date.
|
|
||||||
* `purchase_date` - License purchase date.
|
|
||||||
* `expiry_date` - Expiry date of the license.
|
|
||||||
* `maintenance_expiry_date` - Expiry date of the maintenance period.
|
|
||||||
* `grace_period_end_date` - Grace period beyond expiry date.
|
|
||||||
* `maximum_users` - Maximum number of users for license.
|
|
||||||
* `unlimited_users` - Boolean flag if this is an unlimited user license.
|
|
||||||
* `server_id` - Server ID.
|
|
||||||
* `support_entitlement_number` - Entitlement number for support requests.
|
|
||||||
|
|
||||||
#### Import License
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_license.main license
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Set Mail Server Configuration
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
resource "bitbucketserver_mail_server" "mail" {
|
|
||||||
hostname = "mail.example.com"
|
|
||||||
port = 465
|
|
||||||
protocol = "SMTPS"
|
|
||||||
sender_address = "bitbucket@example.com"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* `hostname` - Required. Hostname of the mail server.
|
|
||||||
* `port` - Required. Port number of the mail server. Typically port 25 or 587 for SMTP and 465 for SMTPS.
|
|
||||||
* `sender_address` - Required. Email address for notification emails.
|
|
||||||
* `protocol` - Optional. SMTP or SMTPS supported. Default `SMTP`
|
|
||||||
* `use_start_tls` - Optional. Use SSL/TLS if available. Default `true`
|
|
||||||
* `require_start_tls` - Optional. Require SSL to be used. Default `false`
|
|
||||||
* `username` - Optional. User to connect with.
|
|
||||||
* `password` - Optional. User to connect with.
|
|
||||||
|
|
||||||
#### Import Mail Configuration
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ terraform import bitbucketserver_mail_server.mail mail.example.com
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
id: data_application_properties
|
id: data_bitbucketserver_application_properties
|
||||||
title: bitbucketserver_application_properties
|
title: bitbucketserver_application_properties
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ This data source allows you to retrieve version information and other applicatio
|
|||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_application_properties" "main" { }
|
data "bitbucketserver_application_properties" "main" { }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
id: data_global_permissions_groups
|
id: data_bitbucketserver_global_permissions_groups
|
||||||
title: bitbucketserver_global_permissions_groups
|
title: bitbucketserver_global_permissions_groups
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ Retrieve a list of groups that have been granted at least one global permission.
|
|||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_global_permissions_groups" "all" { }
|
data "bitbucketserver_global_permissions_groups" "all" { }
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ data "bitbucketserver_global_permissions_groups" "all" { }
|
|||||||
|
|
||||||
Find any groups starting with `dev`.
|
Find any groups starting with `dev`.
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_global_permissions_groups" "dev-groups" {
|
data "bitbucketserver_global_permissions_groups" "dev-groups" {
|
||||||
filter = "dev"
|
filter = "dev"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
id: data_global_permissions_users
|
id: data_bitbucketserver_global_permissions_users
|
||||||
title: bitbucketserver_global_permissions_users
|
title: bitbucketserver_global_permissions_users
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ Retrieve a list of users that have been granted at least one global permission.
|
|||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_global_permissions_users" "all" { }
|
data "bitbucketserver_global_permissions_users" "all" { }
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ data "bitbucketserver_global_permissions_users" "all" { }
|
|||||||
|
|
||||||
Find any users starting with `malcolm`.
|
Find any users starting with `malcolm`.
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_global_permissions_users" "malcolms" {
|
data "bitbucketserver_global_permissions_users" "malcolms" {
|
||||||
filter = "malcolm"
|
filter = "malcolm"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
id: data_group_users
|
id: data_bitbucketserver_group_users
|
||||||
title: bitbucketserver_group_users
|
title: bitbucketserver_group_users
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ Retrieve a list of users for a specific group.
|
|||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_group_users" "stash-users" {
|
data "bitbucketserver_group_users" "stash-users" {
|
||||||
group = "stash-users"
|
group = "stash-users"
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,7 @@ data "bitbucketserver_group_users" "stash-users" {
|
|||||||
|
|
||||||
Find any users starting with `malcolm`.
|
Find any users starting with `malcolm`.
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_group_users" "malcolms" {
|
data "bitbucketserver_group_users" "malcolms" {
|
||||||
group = "stash-users"
|
group = "stash-users"
|
||||||
filter = "malcolm"
|
filter = "malcolm"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
id: data_groups
|
id: data_bitbucketserver_groups
|
||||||
title: bitbucketserver_groups
|
title: bitbucketserver_groups
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ This data source allows you to retrieve a list of groups, optionally matching th
|
|||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_groups" "all" { }
|
data "bitbucketserver_groups" "all" { }
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ data "bitbucketserver_groups" "all" { }
|
|||||||
|
|
||||||
Find any groups starting with `dev`.
|
Find any groups starting with `dev`.
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_groups" "dev-groups" {
|
data "bitbucketserver_groups" "dev-groups" {
|
||||||
filter = "dev"
|
filter = "dev"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
id: data_plugin
|
id: data_bitbucketserver_plugin
|
||||||
title: bitbucketserver_plugin
|
title: bitbucketserver_plugin
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -7,12 +7,14 @@ This data source allows you to retrieve installed plugin information and license
|
|||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_plugin" "my-plugin" {
|
data "bitbucketserver_plugin" "my-plugin" {
|
||||||
key = "com.example.plugin-my-plugin"
|
key = "com.example.plugin-my-plugin"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
* `key` - Unique key of the plugin.
|
* `key` - Unique key of the plugin.
|
||||||
|
|
||||||
## Attribute Reference
|
## Attribute Reference
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
id: data_project_permissions_groups
|
id: data_bitbucketserver_project_permissions_groups
|
||||||
title: bitbucketserver_project_permissions_groups
|
title: bitbucketserver_project_permissions_groups
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ Retrieve a list of groups that have been granted at least one project level perm
|
|||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_project_permissions_groups" "test-groups" {
|
data "bitbucketserver_project_permissions_groups" "test-groups" {
|
||||||
project = "TEST"
|
project = "TEST"
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,7 @@ data "bitbucketserver_project_permissions_groups" "test-groups" {
|
|||||||
|
|
||||||
Find project groups starting with `dev` with project permissions.
|
Find project groups starting with `dev` with project permissions.
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_project_permissions_groups" "dev-groups" {
|
data "bitbucketserver_project_permissions_groups" "dev-groups" {
|
||||||
project = "TEST"
|
project = "TEST"
|
||||||
filter = "dev"
|
filter = "dev"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
id: data_project_permissions_users
|
id: data_bitbucketserver_project_permissions_users
|
||||||
title: bitbucketserver_project_permissions_users
|
title: bitbucketserver_project_permissions_users
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ Retrieve a list of users that have been granted at least one permission for the
|
|||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_project_permissions_users" "test-users" {
|
data "bitbucketserver_project_permissions_users" "test-users" {
|
||||||
project = "TEST"
|
project = "TEST"
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,7 @@ data "bitbucketserver_project_permissions_users" "test-users" {
|
|||||||
|
|
||||||
Find project users starting with `malcolm`.
|
Find project users starting with `malcolm`.
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_project_permissions_users" "malcolms" {
|
data "bitbucketserver_project_permissions_users" "malcolms" {
|
||||||
project = "TEST"
|
project = "TEST"
|
||||||
filter = "malcolm"
|
filter = "malcolm"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
id: data_repository_permissions_groups
|
id: data_bitbucketserver_repository_permissions_groups
|
||||||
title: bitbucketserver_repository_permissions_groups
|
title: bitbucketserver_repository_permissions_groups
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ Retrieve a list of groups that have been granted at least one repository level p
|
|||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_repository_permissions_groups" "my-repo-groups" {
|
data "bitbucketserver_repository_permissions_groups" "my-repo-groups" {
|
||||||
project = "TEST"
|
project = "TEST"
|
||||||
repository = "my-repo"
|
repository = "my-repo"
|
||||||
@@ -18,7 +18,7 @@ data "bitbucketserver_repository_permissions_groups" "my-repo-groups" {
|
|||||||
|
|
||||||
Find project groups starting with `dev` with project permissions.
|
Find project groups starting with `dev` with project permissions.
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_repository_permissions_groups" "my-repo-dev-groups" {
|
data "bitbucketserver_repository_permissions_groups" "my-repo-dev-groups" {
|
||||||
project = "TEST"
|
project = "TEST"
|
||||||
repository = "my-repo"
|
repository = "my-repo"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
id: data_repository_permissions_users
|
id: data_bitbucketserver_repository_permissions_users
|
||||||
title: bitbucketserver_repository_permissions_users
|
title: bitbucketserver_repository_permissions_users
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ Retrieve a list of users that have been granted at least one permission for the
|
|||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_repository_permissions_users" "my-repo-users" {
|
data "bitbucketserver_repository_permissions_users" "my-repo-users" {
|
||||||
project = "TEST"
|
project = "TEST"
|
||||||
repository = "my-repo"
|
repository = "my-repo"
|
||||||
@@ -18,7 +18,7 @@ data "bitbucketserver_repository_permissions_users" "my-repo-users" {
|
|||||||
|
|
||||||
Find repository users starting with `malcolm`.
|
Find repository users starting with `malcolm`.
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
data "bitbucketserver_repository_permissions_users" "my-repo-malcolms" {
|
data "bitbucketserver_repository_permissions_users" "my-repo-malcolms" {
|
||||||
project = "TEST"
|
project = "TEST"
|
||||||
repository = "my-repo"
|
repository = "my-repo"
|
||||||
|
|||||||
28
docusaurus/docs/resource_global_permissions_group.md
Normal file
28
docusaurus/docs/resource_global_permissions_group.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_global_permissions_group
|
||||||
|
title: bitbucketserver_global_permissions_group
|
||||||
|
---
|
||||||
|
|
||||||
|
Set global permissions for a given group.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_global_permissions_group" "test" {
|
||||||
|
group = "stash-users"
|
||||||
|
permission = "ADMIN"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `group` - Required. Name of the group permissions are for.
|
||||||
|
* `permission` - Required. The permission to grant. Available global permissions are: `LICENSED_USER`, `PROJECT_CREATE`, `ADMIN`, `SYS_ADMIN`
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import a group global permissions via the group name:
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_global_permissions_group.test my-group
|
||||||
|
```
|
||||||
28
docusaurus/docs/resource_global_permissions_user.md
Normal file
28
docusaurus/docs/resource_global_permissions_user.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_global_permissions_user
|
||||||
|
title: bitbucketserver_global_permissions_user
|
||||||
|
---
|
||||||
|
|
||||||
|
Set global permissions for a given user.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_global_permissions_user" "mreynolds" {
|
||||||
|
user = "mreynolds"
|
||||||
|
permission = "ADMIN"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `user` - Required. Name of the user permissions are for.
|
||||||
|
* `permission` - Required. The permission to grant. Available global permissions are: `LICENSED_USER`, `PROJECT_CREATE`, `ADMIN`, `SYS_ADMIN`
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import a user global permissions via the user's name:
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_global_permissions_user.test mreynolds
|
||||||
|
```
|
||||||
26
docusaurus/docs/resource_group.md
Normal file
26
docusaurus/docs/resource_group.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_group
|
||||||
|
title: bitbucketserver_group
|
||||||
|
---
|
||||||
|
|
||||||
|
Create a Bitbucket group.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_group" "browncoats" {
|
||||||
|
name = "browncoats"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `name` - Required. Group to create.
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import a group reference via the name.
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_group.test browncoats
|
||||||
|
```
|
||||||
38
docusaurus/docs/resource_license.md
Normal file
38
docusaurus/docs/resource_license.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_license
|
||||||
|
title: bitbucketserver_license
|
||||||
|
---
|
||||||
|
|
||||||
|
Set the license for the bitbucket server.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_license" "main" {
|
||||||
|
license = "AAACLg0ODAoPeNqNVEtv4jAQvudXRNpbp"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `license` - Required. License to apply.
|
||||||
|
|
||||||
|
## Attribute Reference
|
||||||
|
|
||||||
|
* `creation_date` - License creation date.
|
||||||
|
* `purchase_date` - License purchase date.
|
||||||
|
* `expiry_date` - Expiry date of the license.
|
||||||
|
* `maintenance_expiry_date` - Expiry date of the maintenance period.
|
||||||
|
* `grace_period_end_date` - Grace period beyond expiry date.
|
||||||
|
* `maximum_users` - Maximum number of users for license.
|
||||||
|
* `unlimited_users` - Boolean flag if this is an unlimited user license.
|
||||||
|
* `server_id` - Server ID.
|
||||||
|
* `support_entitlement_number` - Entitlement number for support requests.
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import the license details:
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_license.main license
|
||||||
|
```
|
||||||
36
docusaurus/docs/resource_mail_server.md
Normal file
36
docusaurus/docs/resource_mail_server.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_mail_server
|
||||||
|
title: bitbucketserver_mail_server
|
||||||
|
---
|
||||||
|
|
||||||
|
Setup mail server configuration.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_mail_server" "mail" {
|
||||||
|
hostname = "mail.example.com"
|
||||||
|
port = 465
|
||||||
|
protocol = "SMTPS"
|
||||||
|
sender_address = "bitbucket@example.com"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `hostname` - Required. Hostname of the mail server.
|
||||||
|
* `port` - Required. Port number of the mail server. Typically port 25 or 587 for SMTP and 465 for SMTPS.
|
||||||
|
* `sender_address` - Required. Email address for notification emails.
|
||||||
|
* `protocol` - Optional. SMTP or SMTPS supported. Default `SMTP`
|
||||||
|
* `use_start_tls` - Optional. Use SSL/TLS if available. Default `true`
|
||||||
|
* `require_start_tls` - Optional. Require SSL to be used. Default `false`
|
||||||
|
* `username` - Optional. User to connect with.
|
||||||
|
* `password` - Optional. User to connect with.
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import the existing mail server configuration with the hostname:
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_mail_server.mail mail.example.com
|
||||||
|
```
|
||||||
60
docusaurus/docs/resource_plugin.md
Normal file
60
docusaurus/docs/resource_plugin.md
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_plugin
|
||||||
|
title: bitbucketserver_plugin
|
||||||
|
---
|
||||||
|
|
||||||
|
Install plugins, manage enabled state and set license details.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_plugin" "myplugin" {
|
||||||
|
key = "com.example-my-plugin"
|
||||||
|
version = "1.2.3"
|
||||||
|
license = "ABCDEF"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `key` - Required. Unique key of the plugin.
|
||||||
|
* `version` - Required. Version to install.
|
||||||
|
* `license` - Optional. License to apply to the plugin.
|
||||||
|
* `enabled` - Optional, default `true`. Flag to enable/disable the plugin.
|
||||||
|
|
||||||
|
## Attribute Reference
|
||||||
|
|
||||||
|
* `enabled_by_default` - Set to `true` if the plugin is enabled by default (for system plugins).
|
||||||
|
* `name` - Name of the plugin.
|
||||||
|
* `description` - Plugin description.
|
||||||
|
* `user_installed` - Set to `true` if this is a user installed plugin vs a system bundled plugin.
|
||||||
|
* `optional` - Set to `true` if this is an optional plugin.
|
||||||
|
* `vendor.name` - Name of the vendor.
|
||||||
|
* `vendor.link` - Vendor homepage.
|
||||||
|
* `vendor.marketplace_link` - Plugin marketplace link.
|
||||||
|
* `applied_license.0.valid` - Is the license valid. true/false.
|
||||||
|
* `applied_license.0.evaluation` - Is the license an evaluation. true/false.
|
||||||
|
* `applied_license.0.nearly_expired` - Is the license nearly expired. true/false.
|
||||||
|
* `applied_license.0.maintenance_expiry_date` - Date of maintenance expiry.
|
||||||
|
* `applied_license.0.maintenance_expired` - Is the maintenance expired. true/false.
|
||||||
|
* `applied_license.0.license_type` - Type of license.
|
||||||
|
* `applied_license.0.expiry_date` - Expiry date of the license.
|
||||||
|
* `applied_license.0.raw_license` - The raw license information.
|
||||||
|
* `applied_license.0.renewable` - Is the license renewabl. true/false.
|
||||||
|
* `applied_license.0.organization_name` - Name of the organization the license is for.
|
||||||
|
* `applied_license.0.enterprise` - Is the license for enterprise. true/false.
|
||||||
|
* `applied_license.0.data_center` - Is the license for data center. true/false.
|
||||||
|
* `applied_license.0.subscription` - Is the license a subscription. true/false.
|
||||||
|
* `applied_license.0.active` - Is the license active. true/false.
|
||||||
|
* `applied_license.0.auto_renewal` - Is the license renewed automatically. true/false.
|
||||||
|
* `applied_license.0.upgradable` - Is the license able to be upgraded. true/false.
|
||||||
|
* `applied_license.0.crossgradeable` - Can the license be crossgraded. true/false.
|
||||||
|
* `applied_license.0.purchase_past_server_cutoff_date` - The purchase date past the server cutoff date. true/false.
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import a plugin reference via the key:
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_plugin.myplugin com.example-my-plugin
|
||||||
|
```
|
||||||
33
docusaurus/docs/resource_project.md
Normal file
33
docusaurus/docs/resource_project.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_project
|
||||||
|
title: bitbucketserver_project
|
||||||
|
---
|
||||||
|
|
||||||
|
Create a Bitbucket Project to hold repositories.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_project" "test" {
|
||||||
|
key = "TEST"
|
||||||
|
name = "test-01"
|
||||||
|
description = "Test project"
|
||||||
|
avatar = "data:(content type, e.g. image/png);base64,(data)"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `key` - Required. Project key to set.
|
||||||
|
* `name` - Required. Name of the project.
|
||||||
|
* `description` - Optional. Description of the project.
|
||||||
|
* `avatar` - Optional. Avatar to use containing base64-encoded image data. Format: `data:(content type, e.g. image/png);base64,(data)`
|
||||||
|
* `public` - Optional. Flag to make the project public or private. Default `false`.
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import a project reference via the key:
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_project.test TEST
|
||||||
|
```
|
||||||
34
docusaurus/docs/resource_project_permissions_group.md
Normal file
34
docusaurus/docs/resource_project_permissions_group.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_project_permissions_group
|
||||||
|
title: bitbucketserver_project_permissions_group
|
||||||
|
---
|
||||||
|
|
||||||
|
Set project level permissions for a given group.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_project_permissions_group" "my-proj" {
|
||||||
|
project = "MYPROJ"
|
||||||
|
group = "stash-users"
|
||||||
|
permission = "PROJECT_WRITE"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `project` - Required. Project key to set permissions for.
|
||||||
|
* `group` - Required. Name of the group permissions are for.
|
||||||
|
* `permission` - Required. The permission to grant. Available project permissions are:
|
||||||
|
|
||||||
|
* `PROJECT_READ`
|
||||||
|
* `PROJECT_WRITE`
|
||||||
|
* `PROJECT_ADMIN`
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import a group project level permissions via the project & group names:
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_project_permissions_group.test MYPROJ/stash-users
|
||||||
|
```
|
||||||
34
docusaurus/docs/resource_project_permissions_user.md
Normal file
34
docusaurus/docs/resource_project_permissions_user.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_project_permissions_user
|
||||||
|
title: bitbucketserver_project_permissions_user
|
||||||
|
---
|
||||||
|
|
||||||
|
Set project permissions for a given user.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_project_permissions_user" "mreynolds" {
|
||||||
|
project = "MYPROJ"
|
||||||
|
user = "mreynolds"
|
||||||
|
permission = "PROJECT_WRITE"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `project` - Required. Name of the project to assign permissions to.
|
||||||
|
* `user` - Required. Name of the user permissions are for.
|
||||||
|
* `permission` - Required. The permission to grant. Available project permissions are:
|
||||||
|
|
||||||
|
* `PROJECT_READ`
|
||||||
|
* `PROJECT_WRITE`
|
||||||
|
* `PROJECT_ADMIN`
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import a user project permissions via the project and user name:
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_global_permissions_user.test MYPROJ/mreynolds
|
||||||
|
```
|
||||||
40
docusaurus/docs/resource_repository.md
Normal file
40
docusaurus/docs/resource_repository.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_repository
|
||||||
|
title: bitbucketserver_repository
|
||||||
|
---
|
||||||
|
|
||||||
|
Create a Bitbucket Repository.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_repository" "test" {
|
||||||
|
project = "MYPROJ"
|
||||||
|
name = "test-01"
|
||||||
|
description = "Test repository"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `project` - Required. Name of the project to create the repository in.
|
||||||
|
* `name` - Required. Name of the repository.
|
||||||
|
* `slug` - Optional. Slug to use for the repository. Calculated if not defined.
|
||||||
|
* `description` - Optional. Description of the repository.
|
||||||
|
* `forkable` - Optional. Enable/disable forks of this repository. Default `true`
|
||||||
|
* `public` - Optional. Determine if this repository is public. Default `false`
|
||||||
|
|
||||||
|
## Attribute Reference
|
||||||
|
|
||||||
|
Additional to the above, the following attributes are emitted:
|
||||||
|
|
||||||
|
* `clone_ssh` - URL for SSH cloning of the repository.
|
||||||
|
* `clone_https` - URL for HTTPS cloning of the repository.
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import a repository using the project key and repository slug:
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_repository.test MYPROJ/test-01
|
||||||
|
```
|
||||||
36
docusaurus/docs/resource_repository_permissions_group.md
Normal file
36
docusaurus/docs/resource_repository_permissions_group.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_repository_permissions_group
|
||||||
|
title: bitbucketserver_repository_permissions_group
|
||||||
|
---
|
||||||
|
|
||||||
|
Set repository level permissions for a given group.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_repository_permissions_group" "my-repo" {
|
||||||
|
project = "MYPROJ"
|
||||||
|
repository = "repo1"
|
||||||
|
group = "stash-users"
|
||||||
|
permission = "REPO_WRITE"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `project` - Required. Project key the repository is contained within.
|
||||||
|
* `repository` - Required. Repository slug to set the permissions for.
|
||||||
|
* `group` - Required. Name of the group permissions are for.
|
||||||
|
* `permission` - Required. The permission to grant. Available permissions are:
|
||||||
|
|
||||||
|
* `REPO_READ`
|
||||||
|
* `REPO_WRITE`
|
||||||
|
* `REPO_ADMIN`
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import a group project level permissions via the project & group names:
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_repository_permissions_group.test MYPROJ/repo1/stash-users
|
||||||
|
```
|
||||||
36
docusaurus/docs/resource_repository_permissions_user.md
Normal file
36
docusaurus/docs/resource_repository_permissions_user.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_repository_permissions_user
|
||||||
|
title: bitbucketserver_repository_permissions_user
|
||||||
|
---
|
||||||
|
|
||||||
|
Set repository permissions for a given user.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_repository_permissions_user" "mreynolds-repo" {
|
||||||
|
project = "MYPROJ"
|
||||||
|
repository = "repo1"
|
||||||
|
user = "mreynolds"
|
||||||
|
permission = "REPO_WRITE"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `project` - Required. Project key the repository is contained within.
|
||||||
|
* `repository` - Required. Repository slug to set the permissions for.
|
||||||
|
* `user` - Required. Name of the user permissions are for.
|
||||||
|
* `permission` - Required. The permission to grant. Available project permissions are:
|
||||||
|
|
||||||
|
* `REPO_READ`
|
||||||
|
* `REPO_WRITE`
|
||||||
|
* `REPO_ADMIN`
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import a group project level permissions via the project & group names:
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_repository_permissions_user.test MYPROJ/repo1/mreynolds
|
||||||
|
```
|
||||||
35
docusaurus/docs/resource_user.md
Normal file
35
docusaurus/docs/resource_user.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_user
|
||||||
|
title: bitbucketserver_user
|
||||||
|
---
|
||||||
|
|
||||||
|
Create a Bitbucket user.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_user" "admin" {
|
||||||
|
name = "mreynolds"
|
||||||
|
display_name = "Malcolm Reynolds"
|
||||||
|
email_address = "browncoat@example.com"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `name` - Required. Username of the user.
|
||||||
|
* `display_name` - Required. User's name to display.
|
||||||
|
* `email_address` - Required. Email address of user.
|
||||||
|
* `password_length` - Optional. The length of the generated password on resource creation. Only applies on resource creation. Default `20`.
|
||||||
|
|
||||||
|
## Attribute Reference
|
||||||
|
|
||||||
|
* `initial_password` - The generated user password. Only available if password was handled on Terraform resource creation, not import.
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import a user reference via the user's name.
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_user.test mreynolds
|
||||||
|
```
|
||||||
28
docusaurus/docs/resource_user_group.md
Normal file
28
docusaurus/docs/resource_user_group.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
id: bitbucketserver_user_group
|
||||||
|
title: bitbucketserver_user_group
|
||||||
|
---
|
||||||
|
|
||||||
|
Assign a User to an existing Bitbucket Group.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
resource "bitbucketserver_user_group" "browncoat" {
|
||||||
|
user = "mreynolds"
|
||||||
|
group = "browncoats"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
* `user` - Required. User to assign group to.
|
||||||
|
* `group` - Required. Group to assign to the user.
|
||||||
|
|
||||||
|
## Import
|
||||||
|
|
||||||
|
Import a user group reference via the user and group keys:
|
||||||
|
|
||||||
|
```
|
||||||
|
terraform import bitbucketserver_user_group.browncoat mreynolds/browncoats
|
||||||
|
```
|
||||||
@@ -4,38 +4,80 @@
|
|||||||
"next": "Next",
|
"next": "Next",
|
||||||
"previous": "Previous",
|
"previous": "Previous",
|
||||||
"docs": {
|
"docs": {
|
||||||
"data_application_properties": {
|
"data_bitbucketserver_application_properties": {
|
||||||
"title": "bitbucketserver_application_properties"
|
"title": "bitbucketserver_application_properties"
|
||||||
},
|
},
|
||||||
"data_global_permissions_groups": {
|
"data_bitbucketserver_global_permissions_groups": {
|
||||||
"title": "bitbucketserver_global_permissions_groups"
|
"title": "bitbucketserver_global_permissions_groups"
|
||||||
},
|
},
|
||||||
"data_global_permissions_users": {
|
"data_bitbucketserver_global_permissions_users": {
|
||||||
"title": "bitbucketserver_global_permissions_users"
|
"title": "bitbucketserver_global_permissions_users"
|
||||||
},
|
},
|
||||||
"data_group_users": {
|
"data_bitbucketserver_group_users": {
|
||||||
"title": "bitbucketserver_group_users"
|
"title": "bitbucketserver_group_users"
|
||||||
},
|
},
|
||||||
"data_groups": {
|
"data_bitbucketserver_groups": {
|
||||||
"title": "bitbucketserver_groups"
|
"title": "bitbucketserver_groups"
|
||||||
},
|
},
|
||||||
"data_plugin": {
|
"data_bitbucketserver_plugin": {
|
||||||
"title": "bitbucketserver_plugin"
|
"title": "bitbucketserver_plugin"
|
||||||
},
|
},
|
||||||
"data_project_permissions_groups": {
|
"data_bitbucketserver_project_permissions_groups": {
|
||||||
"title": "bitbucketserver_project_permissions_groups"
|
"title": "bitbucketserver_project_permissions_groups"
|
||||||
},
|
},
|
||||||
"data_project_permissions_users": {
|
"data_bitbucketserver_project_permissions_users": {
|
||||||
"title": "bitbucketserver_project_permissions_users"
|
"title": "bitbucketserver_project_permissions_users"
|
||||||
},
|
},
|
||||||
"data_repository_permissions_groups": {
|
"data_bitbucketserver_repository_permissions_groups": {
|
||||||
"title": "bitbucketserver_repository_permissions_groups"
|
"title": "bitbucketserver_repository_permissions_groups"
|
||||||
},
|
},
|
||||||
"data_repository_permissions_users": {
|
"data_bitbucketserver_repository_permissions_users": {
|
||||||
"title": "bitbucketserver_repository_permissions_users"
|
"title": "bitbucketserver_repository_permissions_users"
|
||||||
},
|
},
|
||||||
"provider": {
|
"provider": {
|
||||||
"title": "Getting Started"
|
"title": "Getting Started"
|
||||||
|
},
|
||||||
|
"bitbucketserver_global_permissions_group": {
|
||||||
|
"title": "bitbucketserver_global_permissions_group"
|
||||||
|
},
|
||||||
|
"bitbucketserver_global_permissions_user": {
|
||||||
|
"title": "bitbucketserver_global_permissions_user"
|
||||||
|
},
|
||||||
|
"bitbucketserver_group": {
|
||||||
|
"title": "bitbucketserver_group"
|
||||||
|
},
|
||||||
|
"bitbucketserver_license": {
|
||||||
|
"title": "bitbucketserver_license"
|
||||||
|
},
|
||||||
|
"bitbucketserver_mail_server": {
|
||||||
|
"title": "bitbucketserver_mail_server"
|
||||||
|
},
|
||||||
|
"bitbucketserver_plugin": {
|
||||||
|
"title": "bitbucketserver_plugin"
|
||||||
|
},
|
||||||
|
"bitbucketserver_project_permissions_group": {
|
||||||
|
"title": "bitbucketserver_project_permissions_group"
|
||||||
|
},
|
||||||
|
"bitbucketserver_project_permissions_user": {
|
||||||
|
"title": "bitbucketserver_project_permissions_user"
|
||||||
|
},
|
||||||
|
"bitbucketserver_project": {
|
||||||
|
"title": "bitbucketserver_project"
|
||||||
|
},
|
||||||
|
"bitbucketserver_repository_permissions_group": {
|
||||||
|
"title": "bitbucketserver_repository_permissions_group"
|
||||||
|
},
|
||||||
|
"bitbucketserver_repository_permissions_user": {
|
||||||
|
"title": "bitbucketserver_repository_permissions_user"
|
||||||
|
},
|
||||||
|
"bitbucketserver_repository": {
|
||||||
|
"title": "bitbucketserver_repository"
|
||||||
|
},
|
||||||
|
"bitbucketserver_user_group": {
|
||||||
|
"title": "bitbucketserver_user_group"
|
||||||
|
},
|
||||||
|
"bitbucketserver_user": {
|
||||||
|
"title": "bitbucketserver_user"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"links": {},
|
"links": {},
|
||||||
|
|||||||
@@ -4,19 +4,32 @@
|
|||||||
"provider"
|
"provider"
|
||||||
],
|
],
|
||||||
"Data Sources": [
|
"Data Sources": [
|
||||||
"data_application_properties",
|
"data_bitbucketserver_application_properties",
|
||||||
"data_global_permissions_groups",
|
"data_bitbucketserver_global_permissions_groups",
|
||||||
"data_global_permissions_users",
|
"data_bitbucketserver_global_permissions_users",
|
||||||
"data_group_users",
|
"data_bitbucketserver_group_users",
|
||||||
"data_groups",
|
"data_bitbucketserver_groups",
|
||||||
"data_plugin",
|
"data_bitbucketserver_plugin",
|
||||||
"data_project_permissions_groups",
|
"data_bitbucketserver_project_permissions_groups",
|
||||||
"data_project_permissions_users",
|
"data_bitbucketserver_project_permissions_users",
|
||||||
"data_repository_permissions_groups",
|
"data_bitbucketserver_repository_permissions_groups",
|
||||||
"data_repository_permissions_users"
|
"data_bitbucketserver_repository_permissions_users"
|
||||||
],
|
],
|
||||||
"Resources": [
|
"Resources": [
|
||||||
|
"bitbucketserver_global_permissions_group",
|
||||||
|
"bitbucketserver_global_permissions_user",
|
||||||
|
"bitbucketserver_group",
|
||||||
|
"bitbucketserver_license",
|
||||||
|
"bitbucketserver_mail_server",
|
||||||
|
"bitbucketserver_plugin",
|
||||||
|
"bitbucketserver_project",
|
||||||
|
"bitbucketserver_project_permissions_group",
|
||||||
|
"bitbucketserver_project_permissions_user",
|
||||||
|
"bitbucketserver_repository",
|
||||||
|
"bitbucketserver_repository_permissions_group",
|
||||||
|
"bitbucketserver_repository_permissions_user",
|
||||||
|
"bitbucketserver_user",
|
||||||
|
"bitbucketserver_user_group"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ const siteConfig = {
|
|||||||
secondaryColor: '#66246c',
|
secondaryColor: '#66246c',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
usePrism: ['yaml', 'js', 'bash', 'sh', 'hcl'],
|
||||||
|
|
||||||
// This copyright info is used in /core/Footer.js and blog RSS/Atom feeds.
|
// This copyright info is used in /core/Footer.js and blog RSS/Atom feeds.
|
||||||
copyright: `Copyright © ${new Date().getFullYear()} Gavin Bunney`,
|
copyright: `Copyright © ${new Date().getFullYear()} Gavin Bunney`,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user