mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-03-18 07:23:47 +01:00
Added bitbucketserver_banner resource and bitbucketserver_cluster data source
This commit is contained in:
32
docusaurus/docs/data_cluster.md
Normal file
32
docusaurus/docs/data_cluster.md
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
id: data_bitbucketserver_cluster
|
||||
title: 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.
|
||||
@@ -24,9 +24,22 @@ provider "bitbucketserver" {
|
||||
}
|
||||
```
|
||||
|
||||
You can also specify these parameters through the `BITBUCKET_SERVER`, `BITBUCKER_USERNAME` and `BITBUCKET_PASSWORD` environment variables.
|
||||
### Authentication
|
||||
|
||||
## Creating a Project and Repository
|
||||
The `username` and `password` specified should be of a user with sufficient privileges to perform the operations you are after.
|
||||
Typically this is a user with `SYS_ADMIN` global permissions.
|
||||
|
||||
### Environment Variables
|
||||
|
||||
You can also specify the provider configuration using the following env vars:
|
||||
|
||||
* `BITBUCKET_SERVER`
|
||||
* `BITBUCKER_USERNAME`
|
||||
* `BITBUCKET_PASSWORD`
|
||||
|
||||
> Note: The hcl provider configuration takes precedence over the environment variables.
|
||||
|
||||
## Example - Creating a Project and Repository
|
||||
|
||||
Creating a project and repository is super simple with this provider:
|
||||
|
||||
@@ -45,7 +58,7 @@ resource "bitbucketserver_project" "test" {
|
||||
|
||||
resource "bitbucketserver_repository" "test" {
|
||||
project = bitbucketserver_project.test.key
|
||||
name = "test-01"
|
||||
name = "repo-01"
|
||||
description = "Test repository"
|
||||
}
|
||||
```
|
||||
|
||||
28
docusaurus/docs/resource_banner.md
Normal file
28
docusaurus/docs/resource_banner.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
id: bitbucketserver_banner
|
||||
title: 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
|
||||
```
|
||||
Reference in New Issue
Block a user