Setup docs for bitbucket provider.

This commit is contained in:
Colin Wood 2016-08-08 10:25:52 -07:00
parent bd9ddff0cc
commit d1373208aa
4 changed files with 163 additions and 0 deletions

View File

@ -0,0 +1,41 @@
---
layout: "bitbucket"
page_title: "Provider: Bitbucket"
sidebar_current: "docs-bitbucket-index"
description: |-
The Bitbucket proivder to interact with repositories, projects, etc..
---
# Bitbucket Provider
The Bitbucket provider allows you to manage resources including repositories,
webhooks, and default reviewers.
Use the navigation to the left to read about the available resources.
## Example Usage
```
# Configure the Bitbucket Provider
provider "bitbucket" {
username = "GobBluthe"
password = "idoillusions" # you can also use app passwords
}
resource "bitbucket_repsitory" "illusions" {
owner = "theleagueofmagicians"
name = "illussions"
scm = "hg"
is_private = true
}
```
## Argument Reference
The following arguments are supported in the `provider` block:
* `username` - (Required) Your username used to connect to bitbucket. You can
also set this via the environment variable. `BITBUCKET_USERNAME`
* `username` - (Required) Your passowrd used to connect to bitbucket. You can
also set this via the environment variable. `BITBUCKET_PASSWORD`

View File

@ -0,0 +1,35 @@
---
layout: "bitbucket"
page_title: "Bitbucket: bitbucket_default_reviewers"
sidebar_current: "docs-bitbucket-resource-default-reviewers"
description: |-
Provides support for setting up default reviews for bitbucket.
---
# bitbucket\_default_reviewers
Provides support for setting up default reviewers for your repository.
## Example Usage
```
# Manage your respository
resource "bitbucket_default_reviewers" "infastracture" {
username = "myteam"
repository = "terraform-code"
reviewers = [
"gob",
"michael",
"michalejr"
]
}
```
## Argument Reference
The following arguments are supported:
* `username` - (Required) The owner of this repository. Can be you or any team you
have write access to.
* `repository` - (Required) The name of the repository.
* `reviewers` - (Required) A list of reviewers to use.

View File

@ -0,0 +1,39 @@
---
layout: "bitbucket"
page_title: "Bitbucket: bitbucket_hoook"
sidebar_current: "docs-bitbucket-resource-hook"
description: |-
Provides a Bitbucket Webhook
---
# bitbucket\_hook
Provides a Bitbucket hook resource.
This allows you to manage your webhooks on a repository.
## Example Usage
```
# Manage your respositories hooks
resource "bitbucket_hook" "deploy_on_push" {
username = "myteam"
repository = "terraform-code"
url = "https://mywebhookservice.mycompany.com/deploy-on-push"
description = "Deploy the code via my webhook"
events = [
"repo:push"
]
}
```
## Argument Reference
The following arguments are supported:
* `username` - (Required) The owner of this repository. Can be you or any team you
have write access to.
* `repository` - (Required) The name of the repository.
* `url` - (Required) Where to POST to.
* `description` - (Required) The name / description to show in the UI.
* `events` - (Required) The event you want to react on.

View File

@ -0,0 +1,48 @@
---
layout: "bitbucket"
page_title: "Bitbucket: bitbucket_repository"
sidebar_current: "docs-bitbucket-resource-repository"
description: |-
Provides a Bitbucket Repository
---
# bitbucket\_repository
Provides a Bitbucket repository resource.
This resource allows you manage your repositories such as scm type, if it is
private, how to fork the repository and other options.
## Example Usage
```
# Manage your respository
resource "bitbucket_repository" "infastracture" {
owner = "myteam"
name = "terraform-code"
}
```
## Argument Reference
The following arguments are supported:
* `owner` - (Required) The owner of this repository. Can be you or any team you
have write access to.
* `name` - (Optional) The name of the repository.
* `scm` - (Optional) What SCM you want to use. Valid options are hg or git.
Defaults to git.
* `is_private` - (Optional) If this should be private or not. Defaults to true.
* `website` - (Optional) What the website is for this repository.
* `has_issues` - (Optional) If this should have issues turned on or not.
* `has_wiki` - (Optional) If this should have wiki turned on or not.
* `project_key` - (Optional) If you want to have this repo associated with a
project.
* `fork_policy` - (Optional) What the fork policy should be. Defaults to
allow_forks.
* `description` - (Optional) What the description of the repo is.
## Computed Arguments
The following arguments are computed. You can access both `clone_ssh` and
`clone_https` for getting a clone URL.