2017-01-18 15:43:09 +01:00
|
|
|
---
|
|
|
|
layout: "profitbricks"
|
|
|
|
page_title: "Provider: ProfitBricks"
|
|
|
|
sidebar_current: "docs-profitbricks-index"
|
|
|
|
description: |-
|
|
|
|
A provider for ProfitBricks.
|
|
|
|
---
|
|
|
|
|
|
|
|
# ProfitBricks Provider
|
|
|
|
|
|
|
|
The ProfitBricks provider gives the ability to deploy and configure resources using ProfitBricks Cloud API.
|
|
|
|
|
|
|
|
Use the navigation to the left to read about the available resources.
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
The provider needs to be configured with proper credentials before it can be used.
|
|
|
|
|
|
|
|
|
|
|
|
```
|
2017-02-18 23:48:50 +01:00
|
|
|
$ export PROFITBRICKS_USERNAME="profitbricks_username"
|
2017-01-18 15:43:09 +01:00
|
|
|
$ export PROFITBRICKS_PASSWORD="profitbricks_password"
|
2017-02-02 20:49:18 +01:00
|
|
|
$ export PROFITBRICKS_API_URL="profitbricks_rest_url"
|
2017-01-18 15:43:09 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
Or you can provide your credentials like this:
|
|
|
|
|
|
|
|
|
|
|
|
The credentials provided in `.tf` file will override credentials in the environment variables.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
provider "profitbricks" {
|
2017-02-18 23:48:50 +01:00
|
|
|
username = "profitbricks_username"
|
|
|
|
password = "profitbricks_password"
|
|
|
|
endpoint = "profitbricks_rest_url"
|
|
|
|
retries = 100
|
2017-01-18 15:43:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "profitbricks_datacenter" "main" {
|
2017-02-18 23:48:50 +01:00
|
|
|
# ...
|
|
|
|
}
|
2017-01-18 15:43:09 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2017-02-18 23:48:50 +01:00
|
|
|
## Configuration Reference
|
2017-01-18 15:43:09 +01:00
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `username` - (Required) If omitted, the `PROFITBRICKS_USERNAME` environment variable is used.
|
2017-02-18 23:48:50 +01:00
|
|
|
|
2017-01-18 15:43:09 +01:00
|
|
|
* `password` - (Required) If omitted, the `PROFITBRICKS_PASSWORD` environment variable is used.
|
|
|
|
|
2017-02-02 20:49:18 +01:00
|
|
|
* `endpoint` - (Required) If omitted, the `PROFITBRICKS_API_URL` environment variable is used.
|
|
|
|
|
2017-01-18 15:43:09 +01:00
|
|
|
* `retries` - (Optional) Number of retries while waiting for a resource to be provisioned. Default value is 50.
|
|
|
|
|
2017-02-18 23:48:50 +01:00
|
|
|
|
2017-01-18 15:43:09 +01:00
|
|
|
#Support
|
|
|
|
You are welcome to contact us with questions or comments at [ProfitBricks DevOps Central](https://devops.profitbricks.com/).
|