This is an example of a standard production-sized Braintrust data plane deployment. Copy this directory to a new directory in your own repository and modify the files to match your environment.
Tip
For a smaller deployment suitable for testing and evaluation, see examples/braintrust-data-plane-sandbox/.
provider.tfshould be modified to use your AWS account and region.terraform.tfshould be modified to use the remote backend that your company uses. Typically this is an S3 bucket and DynamoDB table.main.tfshould be modified to meet your needs for the Braintrust deployment. The defaults are sensible only for a small development deployment.- Brainstore requires a license key which you can find in the Braintrust UI under Settings > Data Plane

- The recommended approach is to store the license key in AWS Secrets Manager and reference it using a Terraform data source:
Then pass
data "aws_secretsmanager_secret_version" "brainstore_license" { secret_id = "braintrust/brainstore-license-key" }
data.aws_secretsmanager_secret_version.brainstore_license.secret_stringas thebrainstore_license_keyvalue in the module. - Alternatively, you can pass the key without storing it in Secrets Manager:
- Set
TF_VAR_brainstore_license_key=your-keyin your terraform environment - Pass it into terraform as a flag
terraform apply -var 'brainstore_license_key=your-key' - Add it to an uncommitted
terraform.tfvarsor.auto.tfvarsfile.
- Set
If you're using a brand new AWS account for your Braintrust data plane you will need to run ./scripts/create-service-linked-roles.sh once to ensure IAM service-linked roles are created.
After applying this configuration you will have a Braintrust data plane deployed in your AWS account. You can then run terraform output to get the API URL you need to enter into the Braintrust UI for your Organization.
❯ terraform output
api_url = "https://dx6ntff6gocr6.cloudfront.net"
To configure your Organization to use your new data plane, click your user icon on the top right > Settings > Data Plane.
Warning
If you are testing, it is HIGHLY recommended that you create a new Braintrust Organization for testing your new data plane. If you change your live Organization's API URL, you might break users who are currently using it.
Click Edit
Paste the API URL into the text field, and click Save. Leave the Proxy and Realtime URL blank.
Verify in the UI that the ping to each endpoint is successful.



