mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-03-22 17:39:07 +01:00
Port to GitHub actions & publish to Terraform registry (#39)
* Port to GitHub actions * Fix * Make docs terraform registry compatible
This commit is contained in:
25
docs/resources/bitbucketserver_banner.md
Normal file
25
docs/resources/bitbucketserver_banner.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Resource: bitbucketserver_banner
|
||||
|
||||
Manage the announcement banner, updating as required.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```hcl
|
||||
resource "bitbucketserver_banner" "main" {
|
||||
message = "Bitbucket is down for maintenance\n*Save your work*"
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
* `message` - Required. Information to display to the user. Markdown supported.
|
||||
* `enabled` - Optional. Turn the announcement banner on/off. Default `true`.
|
||||
* `audience` - Optional. Set the audience for the announcement. Must be one of `ALL` or `AUTHENTICATED`. Default `ALL`.
|
||||
|
||||
## Import
|
||||
|
||||
Import the banner:
|
||||
|
||||
```
|
||||
terraform import bitbucketserver_banner.main banner
|
||||
```
|
||||
@@ -0,0 +1,49 @@
|
||||
# Resource: bitbucketserver_default_reviewers_condition
|
||||
|
||||
Create a default reviewers condition for project or repository.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```hcl
|
||||
resource "bitbucketserver_default_reviewers_condition" "condition" {
|
||||
project_key = "PRO"
|
||||
repository_slug = "repository-1"
|
||||
source_matcher = {
|
||||
id = "any"
|
||||
type_id = "ANY_REF"
|
||||
}
|
||||
target_matcher = {
|
||||
id = "any"
|
||||
type_id = "ANY_REF"
|
||||
}
|
||||
reviewers = [1]
|
||||
required_approvals = 1
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
* `project_key` - Required. Project key.
|
||||
* `repository_slug` - Optional. Repository slug. If empty, default reviewers condition will be created for the whole project.
|
||||
* `source_matcher.id` - Required. Source branch matcher id. It can be either `"any"` to match all branches, `"refs/heads/master"` to match certain branch, `"pattern"` to match multiple branches or `"development"` to match branching model.
|
||||
* `source_matcher.type_id` - Required. Source branch matcher type.It must be one of: `"ANY_REF"`, `"BRANCH"`, `"PATTERN"`, `"MODEL_BRANCH"`.
|
||||
* `target_matcher.id` - Required. Target branch matcher id. It can be either `"any"` to match all branches, `"refs/heads/master"` to match certain branch, `"pattern"` to match multiple branches or `"development"` to match branching model.
|
||||
* `target_matcher.type_id` - Required. Target branch matcher type. It must be one of: `"ANY_REF"`, `"BRANCH"`, `"PATTERN"`, `"MODEL_BRANCH"`.
|
||||
* `reviewers` - Required. IDs of Bitbucket users to become default reviewers when new pull request is created.
|
||||
* `required_approvals` - Required. The number of default reviewers that must approve a pull request. Can't be higher than length of `reviewers`.
|
||||
|
||||
You can find more information about [how to use branch matchers here](https://confluence.atlassian.com/bitbucketserver/add-default-reviewers-to-pull-requests-834221295.html).
|
||||
|
||||
## Import
|
||||
|
||||
Import a default reviewers condition reference via the ID in this format `condition_id:project_key:repository_slug`.
|
||||
|
||||
```
|
||||
terraform import bitbucketserver_default_reviewers_condition.test 1:pro:repo
|
||||
```
|
||||
|
||||
When importing a default reviewers condition for the whole project omit the `repository_slug`.
|
||||
|
||||
```
|
||||
terraform import bitbucketserver_default_reviewers_condition.test 1:pro
|
||||
```
|
||||
25
docs/resources/bitbucketserver_global_permissions_group.md
Normal file
25
docs/resources/bitbucketserver_global_permissions_group.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Resource: 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
|
||||
```
|
||||
25
docs/resources/bitbucketserver_global_permissions_user.md
Normal file
25
docs/resources/bitbucketserver_global_permissions_user.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Resource: 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
|
||||
```
|
||||
24
docs/resources/bitbucketserver_group.md
Normal file
24
docs/resources/bitbucketserver_group.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Resource: bitbucketserver_group
|
||||
|
||||
Create a Bitbucket group.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```hcl
|
||||
resource "bitbucketserver_group" "browncoats" {
|
||||
name = "browncoats"
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
* `name` - Required. Group to create.
|
||||
* `import_if_exists` - Optional. Import groups that already exist in bitbucket into the terraform state file.
|
||||
|
||||
## Import
|
||||
|
||||
Import a group reference via the name.
|
||||
|
||||
```
|
||||
terraform import bitbucketserver_group.test browncoats
|
||||
```
|
||||
35
docs/resources/bitbucketserver_license.md
Normal file
35
docs/resources/bitbucketserver_license.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Resource: 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
|
||||
```
|
||||
33
docs/resources/bitbucketserver_mail_server.md
Normal file
33
docs/resources/bitbucketserver_mail_server.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Resource: 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
|
||||
```
|
||||
57
docs/resources/bitbucketserver_plugin.md
Normal file
57
docs/resources/bitbucketserver_plugin.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Resource: 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
|
||||
```
|
||||
25
docs/resources/bitbucketserver_plugin_config.md
Normal file
25
docs/resources/bitbucketserver_plugin_config.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Resource: bitbucketserver_plugin_config
|
||||
|
||||
Configure plugins.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```hcl
|
||||
resource "bitbucketserver_plugin_config" "mypluginconfig" {
|
||||
config_endpoint = "/rest/1.0/myplugin/config"
|
||||
values = "{"\key\": \"value\"}"
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
* `config_endpoint` - Required. Path to the configuration endpoint. Relative to the bitbucket server url configured in the provider.
|
||||
* `values` - Required. Plugin configuration in JSON format.
|
||||
|
||||
## Import
|
||||
|
||||
Import a plugin config reference via the key:
|
||||
|
||||
```
|
||||
terraform import bitbucketserver_plugin_config.mypluginkey my-plugin-key
|
||||
```
|
||||
30
docs/resources/bitbucketserver_project.md
Normal file
30
docs/resources/bitbucketserver_project.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Resource: 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
|
||||
```
|
||||
18
docs/resources/bitbucketserver_project_hook.md
Normal file
18
docs/resources/bitbucketserver_project_hook.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Resource: bitbucketserver_project_hook
|
||||
|
||||
Manage a project level hook. Extends what Bitbucket does every time a repository changes, for example when code is pushed or a pull request is merged.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```hcl
|
||||
resource "bitbucketserver_project_hook" "main" {
|
||||
project = "MYPROJ"
|
||||
hook = "com.atlassian.bitbucket.server.bitbucket-bundled-hooks:force-push-hook"
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
* `project` - Required. Project Key the hook to enable is for.
|
||||
* `hook` - Required. The hook to enable on the project.
|
||||
* `settings` - Optional. Map of values to apply as settings for the hook. Contents dependant on the individual hook settings.
|
||||
31
docs/resources/bitbucketserver_project_permissions_group.md
Normal file
31
docs/resources/bitbucketserver_project_permissions_group.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Resource: 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
|
||||
```
|
||||
31
docs/resources/bitbucketserver_project_permissions_user.md
Normal file
31
docs/resources/bitbucketserver_project_permissions_user.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Resource: 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
|
||||
```
|
||||
54
docs/resources/bitbucketserver_repository.md
Normal file
54
docs/resources/bitbucketserver_repository.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Resource: bitbucketserver_repository
|
||||
|
||||
Create a Bitbucket Repository.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```hcl
|
||||
resource "bitbucketserver_repository" "test" {
|
||||
project = "MYPROJ"
|
||||
name = "test-01"
|
||||
description = "Test repository"
|
||||
}
|
||||
```
|
||||
|
||||
### Forking an existing repository
|
||||
|
||||
```hcl
|
||||
resource "bitbucketserver_repository" "test" {
|
||||
project = "MYPROJ"
|
||||
name = "test-01"
|
||||
description = "Test repository"
|
||||
fork_repository_project = "MY-ORIGIN-PROJ"
|
||||
fork_repository_slug = "MY-ORIGIN-REPO"
|
||||
}
|
||||
```
|
||||
|
||||
> Note: Both `fork_repository_project` and `fork_repository_slug` are required to specified the origin repository to fork.
|
||||
|
||||
## 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`
|
||||
* `enable_git_lfs` - Optional. Enable git-lfs for this repository. Default `false`
|
||||
* `fork_repository_project` - Optional. Use this to fork an existing repository from the given project.
|
||||
* `fork_repository_slug` - Optional. Use this to fork an existing repository from the given repository.
|
||||
|
||||
## 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
|
||||
```
|
||||
20
docs/resources/bitbucketserver_repository_hook.md
Normal file
20
docs/resources/bitbucketserver_repository_hook.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Resource: bitbucketserver_repository_hook
|
||||
|
||||
Manage a repository level hook. Extends what Bitbucket does every time a repository changes, for example when code is pushed or a pull request is merged.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```hcl
|
||||
resource "bitbucketserver_repository_hook" "main" {
|
||||
project = "MYPROJ"
|
||||
repository = "repo1"
|
||||
hook = "com.atlassian.bitbucket.server.bitbucket-bundled-hooks:force-push-hook"
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
* `project` - Required. Project Key the repository is contained within.
|
||||
* `repository` - Required. Repository slug to enable hook for.
|
||||
* `hook` - Required. The hook to enable on the repository.
|
||||
* `settings` - Optional. Map of values to apply as settings for the hook. Contents dependant on the individual hook settings.
|
||||
@@ -0,0 +1,33 @@
|
||||
# Resource: 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
|
||||
```
|
||||
@@ -0,0 +1,33 @@
|
||||
# Resource: 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
|
||||
```
|
||||
33
docs/resources/bitbucketserver_user.md
Normal file
33
docs/resources/bitbucketserver_user.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Resource: 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.
|
||||
* `user_id` - The user ID.
|
||||
|
||||
## Import
|
||||
|
||||
Import a user reference via the user's name.
|
||||
|
||||
```
|
||||
terraform import bitbucketserver_user.test mreynolds
|
||||
```
|
||||
45
docs/resources/bitbucketserver_user_access_token.md
Normal file
45
docs/resources/bitbucketserver_user_access_token.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# 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
|
||||
|
||||
```hcl
|
||||
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_READ`
|
||||
* `PROJECT_WRITE`
|
||||
* `PROJECT_ADMIN`
|
||||
* `REPO_READ`
|
||||
* `REPO_WRITE`
|
||||
* `REPO_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
|
||||
```
|
||||
25
docs/resources/bitbucketserver_user_group.md
Normal file
25
docs/resources/bitbucketserver_user_group.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Resource: 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
|
||||
```
|
||||
Reference in New Issue
Block a user