BigAnimal Terraform provider
BigAnimal’s Terraform provider 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 resources and data sources for creating, reading, updating, and deleting clusters and regions.
The Terraform provider is licensed under the MPL v2.
We provide support for the BigAnimal Terraform provider itself and not for the underlying environment. To report suspected defects or to submit feature requests, please open a GitHub issue using the guidance found here.
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.
Terraform (version 0.13x or later) downloaded and installed.
A BigAnimal API token for use within the Terraform application. See 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.
Optionally, credentials can also be provided by using the
BA_API_URI environment variable.
- Access the script located here.
- Open the script in
- Copy the script and save it locally with the name
- Modify permissions for the script in your local shell.
- Run the script locally using a command like the following:The resulting output instructs you to log in to a URL with an 8-digit user code. For example:
- In a browser, access the URL, confirm, and re-authenticate if necessary. You should receive a notice that the code has been verified.
- In your local shell a prompt asks:
- When you enter
y, the shell responds with output that provides the access token, refresh token, scope, expiration period, and token type.
- Export the access token into your environment as follows, replacing
<REDACTED>with the access token.Rather than export the token as described in this step, you can use the token to set the value of the
ba_bearer_tokenwhen configuring the BigAnimal provider, as shown in Example usage.
- Now you can follow along with the examples in the Terraform repository.