-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3404 from EnterpriseDB/release/2022-12-01
Release: 2022-12-01
- Loading branch information
Showing
10 changed files
with
413 additions
and
172 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
product_docs/docs/biganimal/release/using_cluster/terraform_provider.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
title: BigAnimal Terraform provider | ||
--- | ||
|
||
BigAnimal’s [Terraform provider](https://registry.terraform.io/providers/EnterpriseDB/biganimal/latest/docs) is an infrastructure-as-code service that allows you to provision cloud resources with the Terraform CLI and incorporate those resources into your existing BigAnimal cloud infrastructure workflows. | ||
|
||
The current version of the Terraform provider offers modules for creating, reading, updating, and deleting clusters and regions. | ||
|
||
The Terraform provider is licensed under the [MPL v2](https://www.mozilla.org/en-US/MPL/2.0/). | ||
|
||
!!!note | ||
We provide support for the BigAnimal Terraform provider itself and not for the underlying environment. | ||
|
||
## Prerequisites | ||
To use Terraform with BigAnimal, you need: | ||
|
||
- A BigAnimal account with an organization set up. If you don't already have a BigAnimal account, see [Getting started with the BigAnimal free trial](/biganimal/latest/free_trial). | ||
|
||
- [Terraform](https://www.terraform.io/downloads) (version 0.13*x* or later) downloaded and installed. | ||
- A BigAnimal API token for use within the Terraform application. See [Getting an API Token](#getting-an-api-token). | ||
|
||
## Example usage | ||
|
||
```terraform | ||
# Configure the BigAnimal Provider | ||
provider "biganimal" { | ||
ba_bearer_token = "<redacted>" | ||
//ba_api_uri = "https://portal.biganimal.com/api/v2" // Optional | ||
} | ||
# Manage the resources | ||
``` | ||
|
||
## Getting an API Token | ||
|
||
To use the BigAnimal API, use the following procedure to fetch an API bearer token and export it into your environment. For additional information about using the BigAnimal API, see [here](/biganimal/latest/reference/). | ||
|
||
Optionally, credentials can also be provided by using the `BA_API_URI` environment variable. | ||
|
||
1. Access the script located [here](https://github.com/EnterpriseDB/cloud-utilities/blob/main/api/get-token.sh). | ||
1. Open the script in `Raw` format. | ||
1. Copy the script and save it locally with the name `get-token.sh`. | ||
1. Modify permissions for the script in your local shell. | ||
1. Run the script locally using a command like the following: | ||
``` | ||
sh <local path>/get-token.sh | ||
``` | ||
The resulting output instructs you to log in to a URL with an 8-digit user code. For example: | ||
``` | ||
Please login to https://auth.biganimal.com/activate?user_code=JWPL-RCXL with your BigAnimal account | ||
``` | ||
1. In a browser, access the URL, confirm, and re-authenticate if necessary. | ||
You should receive a notice that the code has been verified. | ||
1. In your local shell a prompt asks: | ||
``` | ||
Have you finished the login successfully. (y/n) | ||
``` | ||
1. When you enter `y`, the shell responds with output that provides the access token, refresh token, scope, expiration period, and token type. | ||
1. Export the access token into your environment as follows, replacing `<REDACTED>` with the access token. | ||
```bash | ||
export BA_BEARER_TOKEN=<REDACTED> | ||
``` | ||
Rather than export the token as described in this step, you can use the token to set the value of the `ba_bearer_token` when configuring the BigAnimal provider, as shown in [Example usage](#example-usage). | ||
1. Now you can follow along with the [examples](https://github.com/EnterpriseDB/terraform-provider-biganimal/blob/main/examples/README.md) in the Terraform repository. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9f75550
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://edb-docs.netlify.app as production
🚀 Deployed on https://63891e0e11339b57f98e9c1c--edb-docs.netlify.app