Terraform Provider
Batch supports managing collections and team members via terraform.
Usage
First, obtain an API token from https://console.batch.sh/account/security
Then import the provider into your terraform config. For example purposes, we include the token in the actual .tf
file, but it is recommended that you store in Vault or provide via environment variable (BATCHSH_TOKEN
) instead.
Creating Collections
You can either specify the schema and data lake IDs manually, or use the terraform data sources to dynamically pull them like the example below
Importing existing collections
If you already have collections created in your Batch.sh account, and wish to import them, you can use the terraform import command to do so. In this example, we import our collection 15ff9104-de23-4e82-9906-dcc41ccf6aea
and give the name "orders"
Creating Team Members
Team members can also be managed:
Importing existing team members
Just like collections, you can also import existing team members, that were created via the Batch.sh console, into terraform. In this example, we already created an account for our friend Steve in console, and now we want to manage it via terraform:
Last updated