Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gavinbunney/terraform-provider-bitbucketserver
Terraform provider for Bitbucket Server Management
https://github.com/gavinbunney/terraform-provider-bitbucketserver
terraform terraform-bitbucket-provider terraform-provider
Last synced: 4 months ago
JSON representation
Terraform provider for Bitbucket Server Management
- Host: GitHub
- URL: https://github.com/gavinbunney/terraform-provider-bitbucketserver
- Owner: gavinbunney
- License: mpl-2.0
- Created: 2019-10-08T17:10:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-13T14:55:24.000Z (about 1 year ago)
- Last Synced: 2024-09-27T19:21:00.898Z (4 months ago)
- Topics: terraform, terraform-bitbucket-provider, terraform-provider
- Language: Go
- Homepage: https://registry.terraform.io/providers/gavinbunney/bitbucketserver/latest
- Size: 357 KB
- Stars: 29
- Watchers: 2
- Forks: 33
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bitbucket Server Terraform Provider
[![user guide](https://img.shields.io/badge/-user%20guide-blue)](https://registry.terraform.io/providers/gavinbunney/bitbucketserver/latest)
This terraform provider allows management of **Bitbucket Server** resources. The bundled terraform bitbucket provider works only for Bitbucket Cloud.
## Using the provider
Download a binary for your system from the release page and remove the `-os-arch` details so you're left with `terraform-provider-bitbucketserver`.
Use `chmod +x` to make it executable and then either place it at the root of your Terraform folder or in the Terraform plugin folder on your system.See [User Guide](https://gavinbunney.github.io/terraform-provider-bitbucketserver) for details on all the provided data and resource types.
### Example
```hcl
provider "bitbucketserver" {
server = "https://mybitbucket.example.com"
username = "admin"
password = "password"
}resource "bitbucketserver_project" "test" {
key = "TEST"
name = "test-01"
description = "Test project"
}resource "bitbucketserver_repository" "test" {
project = bitbucketserver_project.test.key
name = "test-01"
description = "Test repository"
}
```## Development Guide
### Requirements
- [Terraform](https://www.terraform.io/downloads.html) 0.12.x
- [Go](https://golang.org/doc/install) 1.11+
- correctly setup [GOPATH](http://golang.org/doc/code.html#GOPATH
- add `$GOPATH/bin` to your `$PATH`
- clone this repository to `$GOPATH/src/github.com/gavinbunney/terraform-provider-bitbucketserver`### Building the provider
To build the provider, run `make build`. This will also put the provider binary in the `$GOPATH/bin` directory.
```sh
$ make build
```### Testing
In order to test the provider, you can simply run `make test`.
```sh
$ make test
```In order to run the full suite of acceptance tests, run `make testacc-bitbucket`.
```sh
$ make testacc-bitbucket
```Alternatively, you can manually start Bitbucket Server docker container, run the acceptance tests and then shut down the docker.
```sh
$ scripts/start-docker-compose.sh
$ make testacc
$ scripts/stop-docker-compose.sh
```