Port to GitHub actions & publish to Terraform registry (#39)

* Port to GitHub actions

* Fix

* Make docs terraform registry compatible
This commit is contained in:
Gavin Bunney
2021-07-14 17:47:45 -07:00
committed by GitHub
parent 4adaea3109
commit 0b0d03cda2
55 changed files with 265 additions and 7652 deletions

View File

@@ -0,0 +1,16 @@
# Data Source: bitbucketserver_application_properties
This data source allows you to retrieve version information and other application properties of Bitbucket Server.
## Example Usage
```hcl
data "bitbucketserver_application_properties" "main" { }
```
## Attribute Reference
* `version` - Version of Bitbucket.
* `build_number` - Build number of the Bitbucket instance.
* `build_date` - Date the Bitbucket build was made,
* `display_name` - Name of the Bitbucket instance.

View File

@@ -0,0 +1,29 @@
# Data Source: bitbucketserver_cluster
Gets information about the nodes that currently make up the Bitbucket cluster.
## Example Usage
```hcl
data "bitbucketserver_cluster" "main" { }
output "local_hostname" {
value = "Bitbucket running on ${data.bitbucketserver_cluster.main.local_node.0.hostname}"
}
```
## Attribute Reference
* `local_node` - List with a single element, containing the local node details. See `node` schema below.
* `nodes` - List of nodes of the Bitbucket cluster.
* `running` - Flag is the cluster is running.
### Node Schema
Each node in the attributes above contains the following elements:
* `id` - Unique cluster identifier.
* `name` - Unique cluster identifier.
* `hostname` - Address hostname of the cluster node. Typically an IP address.
* `port` - Port of the cluster node. This is not the same as the Bitbucket UI port, rather the node cluster port.
* `local` - Flag if this is a local node.

View File

@@ -0,0 +1,33 @@
# Data Source: bitbucketserver_global_permissions_groups
Retrieve a list of groups that have been granted at least one global permission.
## Example Usage
```hcl
data "bitbucketserver_global_permissions_groups" "all" { }
```
### Applying a Custom Filter
Find any groups starting with `dev`.
```hcl
data "bitbucketserver_global_permissions_groups" "dev-groups" {
filter = "dev"
}
```
## Argument Reference
* `filter` - Optional. If specified only group names containing the supplied string will be returned.
## Attribute Reference
* `groups` - List of maps containing `name` and `permission` keys. Available permissions are:
* `LICENSED_USER`
* `PROJECT_CREATE`
* `ADMIN`
* `SYS_ADMIN`

View File

@@ -0,0 +1,36 @@
---
id: data_bitbucketserver_global_permissions_users
title: bitbucketserver_global_permissions_users
---
Retrieve a list of users that have been granted at least one global permission.
## Example Usage
```hcl
data "bitbucketserver_global_permissions_users" "all" { }
```
### Applying a Custom Filter
Find any users starting with `malcolm`.
```hcl
data "bitbucketserver_global_permissions_users" "malcolms" {
filter = "malcolm"
}
```
## Argument Reference
* `filter` - Optional. If specified only user's names/emails containing the supplied string will be returned.
## Attribute Reference
* `users` - List of maps containing `name`, `email_address`, `display_name`, `active` and `permission` keys. Available permissions are: `LICENSED_USER`, `PROJECT_CREATE`, `ADMIN`, `SYS_ADMIN`
* `LICENSED_USER`
* `PROJECT_CREATE`
* `ADMIN`
* `SYS_ADMIN`

View File

@@ -0,0 +1,31 @@
# Data Source: bitbucketserver_group_users
Retrieve a list of users for a specific group.
## Example Usage
```hcl
data "bitbucketserver_group_users" "stash-users" {
group = "stash-users"
}
```
### Applying a Custom Filter
Find any users starting with `malcolm`.
```hcl
data "bitbucketserver_group_users" "malcolms" {
group = "stash-users"
filter = "malcolm"
}
```
## Argument Reference
* `group` - Required. Group to find the users for.
* `filter` - Optional. If specified only users matching name/email for the supplied string will be returned.
## Attribute Reference
* `users` - List of maps containing `name`, `email_address`, `display_name` and `active` keys.

View File

@@ -0,0 +1,27 @@
# Data Source: bitbucketserver_groups
This data source allows you to retrieve a list of groups, optionally matching the supplied `filter`.
## Example Usage
```hcl
data "bitbucketserver_groups" "all" { }
```
### Applying a Custom Filter
Find any groups starting with `dev`.
```hcl
data "bitbucketserver_groups" "dev-groups" {
filter = "dev"
}
```
## Argument Reference
* `filter` - Optional. If specified only group names containing the supplied string will be returned.
## Attribute Reference
* `groups` - List of maps containing `name` key.

View File

@@ -0,0 +1,46 @@
# Data Source: bitbucketserver_plugin
This data source allows you to retrieve installed plugin information and license details.
## Example Usage
```hcl
data "bitbucketserver_plugin" "my-plugin" {
key = "com.example.plugin-my-plugin"
}
```
## Argument Reference
* `key` - Unique key of the plugin.
## Attribute Reference
* `enabled` - Set to `true` if the plugin is enabled.
* `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.

View File

@@ -0,0 +1,54 @@
# Data Source: bitbucketserver_project_hooks
Retrieve a list of project hooks and their status' for the specified project.
## Example Usage
```hcl
data "bitbucketserver_project_hooks" "main" {
project = "TEST"
}
# data.bitbucketserver_project_hooks.main.hooks = [{
# "key" = "com.atlassian.bitbucket.server.bitbucket-bundled-hooks:force-push-hook",
# "name" = "Reject Force Push",
# "type" = "PRE_RECEIVE",
# "description" = "Reject all force pushes (git push --force) to this repository",
# "version" = "6.7.0",
# "scope_types" = ["PROJECT", "REPOSITORY"],
# "enabled" = "false",
# "configured" = "false",
# "scope_type" = "PROJECT",
# }]
```
### Applying a Custom Filter
Find specific types of project hooks.
```hcl
data "bitbucketserver_project_hooks" "main" {
project = "TEST"
type = "PRE_RECEIVE"
}
```
## Argument Reference
* `project` - Required. Project Key to lookup hooks for.
* `type` - Optional. Type of hook to find. Must be one of `PRE_RECEIVE`, `POST_RECEIVE`
## Attribute Reference
* `hooks` - List of maps containing:
* `key` - Unique key identifying the hook e.g. `com.atlassian.bitbucket.server.bitbucket-bundled-hooks:force-push-hook`
* `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. `6.7.0`
* `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
* `scope_type` - Type of scope applied for this hook, e.g. `PROJECT`
* `scope_resource_id` - Reference ID of the applied scope, e.g. `1`

View File

@@ -0,0 +1,35 @@
# Data Source: bitbucketserver_project_permissions_groups
Retrieve a list of groups that have been granted at least one project level permission to the specified project.
## Example Usage
```hcl
data "bitbucketserver_project_permissions_groups" "test-groups" {
project = "TEST"
}
```
### Applying a Custom Filter
Find project groups starting with `dev` with project permissions.
```hcl
data "bitbucketserver_project_permissions_groups" "dev-groups" {
project = "TEST"
filter = "dev"
}
```
## Argument Reference
* `project` - Required. Project Key to lookup permissions for.
* `filter` - Optional. If specified only group names containing the supplied string will be returned.
## Attribute Reference
* `groups` - List of maps containing `name` and `permission` keys. Available permissions are:
* `PROJECT_READ`
* `PROJECT_WRITE`
* `PROJECT_ADMIN`

View File

@@ -0,0 +1,35 @@
# Data Source: bitbucketserver_project_permissions_users
Retrieve a list of users that have been granted at least one permission for the specified project.
## Example Usage
```hcl
data "bitbucketserver_project_permissions_users" "test-users" {
project = "TEST"
}
```
### Applying a Custom Filter
Find project users starting with `malcolm`.
```hcl
data "bitbucketserver_project_permissions_users" "malcolms" {
project = "TEST"
filter = "malcolm"
}
```
## Argument Reference
* `project` - Required. Project Key to lookup permissions for.
* `filter` - Optional. If specified only user's names/emails containing the supplied string will be returned.
## Attribute Reference
* `users` - List of maps containing `name`, `email_address`, `display_name`, `active` and `permission` keys. Available permissions are:
* `PROJECT_READ`
* `PROJECT_WRITE`
* `PROJECT_ADMIN`

View File

@@ -0,0 +1,57 @@
# Data Source: bitbucketserver_repository_hooks
Retrieve a list of repository hooks and their status' for the specified repo.
## Example Usage
```hcl
data "bitbucketserver_repository_hooks" "main" {
project = "TEST"
repository = "repo1"
}
# data.bitbucketserver_repository_hooks.main.hooks = [{
# "key" = "com.atlassian.bitbucket.server.bitbucket-bundled-hooks:force-push-hook",
# "name" = "Reject Force Push",
# "type" = "PRE_RECEIVE",
# "description" = "Reject all force pushes (git push --force) to this repository",
# "version" = "6.7.0",
# "scope_types" = ["PROJECT", "REPOSITORY"],
# "enabled" = "false",
# "configured" = "false",
# "scope_type" = "REPOSITORY",
# }]
```
### Applying a Custom Filter
Find specific types of repository hooks.
```hcl
data "bitbucketserver_project_hooks" "main" {
project = "TEST"
repository = "repo1"
type = "PRE_RECEIVE"
}
```
## Argument Reference
* `project` - Required. Project Key the repository is contained within.
* `repository` - Required. Repository slug to lookup hooks for.
* `type` - Optional. Type of hook to find. Must be one of `PRE_RECEIVE`, `POST_RECEIVE`
## Attribute Reference
* `hooks` - List of maps containing:
* `key` - Unique key identifying the hook e.g. `com.atlassian.bitbucket.server.bitbucket-bundled-hooks:force-push-hook`
* `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. `6.7.0`
* `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
* `scope_type` - Type of scope applied for this hook, e.g. `REPOSITORY`
* `scope_resource_id` - Reference ID of the applied scope, e.g. `1`

View File

@@ -0,0 +1,38 @@
# Data Source: bitbucketserver_repository_permissions_groups
Retrieve a list of groups that have been granted at least one repository level permission to the specified repo.
## Example Usage
```hcl
data "bitbucketserver_repository_permissions_groups" "my-repo-groups" {
project = "TEST"
repository = "my-repo"
}
```
### Applying a Custom Filter
Find project groups starting with `dev` with project permissions.
```hcl
data "bitbucketserver_repository_permissions_groups" "my-repo-dev-groups" {
project = "TEST"
repository = "my-repo"
filter = "dev"
}
```
## Argument Reference
* `project` - Required. Project Key to lookup permissions for.
* `repository` - Required. Repository slug to lookup permissions for.
* `filter` - Optional. If specified only group names containing the supplied string will be returned.
## Attribute Reference
* `groups` - List of maps containing `name` and `permission` keys. Available permissions are:
* `REPO_READ`
* `REPO_WRITE`
* `REPO_ADMIN`

View File

@@ -0,0 +1,38 @@
# Data Source: bitbucketserver_repository_permissions_users
Retrieve a list of users that have been granted at least one permission for the specified repository.
## Example Usage
```hcl
data "bitbucketserver_repository_permissions_users" "my-repo-users" {
project = "TEST"
repository = "my-repo"
}
```
### Applying a Custom Filter
Find repository users starting with `malcolm`.
```hcl
data "bitbucketserver_repository_permissions_users" "my-repo-malcolms" {
project = "TEST"
repository = "my-repo"
filter = "malcolm"
}
```
## Argument Reference
* `project` - Required. Project Key to lookup permissions for.
* `repository` - Required. Repository slug to lookup permissions for.
* `filter` - Optional. If specified only user's names/emails containing the supplied string will be returned.
## Attribute Reference
* `users` - List of maps containing `name`, `email_address`, `display_name`, `active` and `permission` keys. Available permissions are:
* `REPO_READ`
* `REPO_WRITE`
* `REPO_ADMIN`

View File

@@ -0,0 +1,21 @@
# Data Source: bitbucketserver_user
This data source allows you to retrieve Bitbucket user details.
## Example Usage
```hcl
data "bitbucketserver_user" "admin" {
name = "admin"
}
```
## Argument Reference
* `name` - Unique name of the user.
## Attribute Reference
* `email_address` - User's email.
* `display_name` - User's display name.
* `user_id` - User's ID.