> ## Documentation Index
> Fetch the complete documentation index at: https://braintrust.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrade your deployment

> Upgrade a self-hosted Braintrust data plane on AWS, GCP, or Azure

<Note>
  Upgrading to data plane v2.0? It requires a multi-step migration with irreversible infrastructure changes. Follow the [Upgrade to v2.0](/docs/admin/self-hosting/upgrade/v2) guide instead.
</Note>

<Tabs>
  <Tab title="AWS" icon="https://img.logo.dev/aws.amazon.com?token=pk_BdcHD9e5SCW3j1rnJkNyMQ">
    This guide shows the routine process for upgrading the Braintrust data plane in your AWS account.

    <Note>
      Upgrading from AWS Terraform module v5.x to v6? It requires a two-step apply to move the API from Lambda to ECS. Follow the [Upgrade to v6](/docs/admin/self-hosting/upgrade/v6) guide instead.
    </Note>

    ## How it works

    On AWS, the Braintrust data plane runs on ECS and EC2 (Terraform module versions before v6.0 run the API on Lambda). The data plane version is **bundled into the Terraform module** — each module release pins specific versions of the Braintrust API and Brainstore in `VERSIONS.json`. When you update your module source to a newer version and run `terraform apply`, Terraform automatically deploys the corresponding data plane.

    To check which data plane version you're currently running, go to **<Icon icon="settings-2" /> Settings** > [**<Icon icon="lock" /> Data plane**](https://www.braintrust.dev/app/~/configuration/org/api-url) in the Braintrust UI.

    ## 1. Update the module version

    Check the [Self-hosting releases](/docs/data-plane-changelog) page for your target data plane version to find the minimum Terraform module version required. Then update the `?ref=` in your module source:

    ```hcl theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
    module "braintrust-data-plane" {
      source = "github.com/braintrustdata/terraform-aws-braintrust-data-plane?ref=vX.Y.Z"

      # ... other configuration ...
    }
    ```

    See all module releases: [GitHub Releases](https://github.com/braintrustdata/terraform-aws-braintrust-data-plane/releases)

    <Warning>
      AWS Terraform module v6.2.0 and later add a mandatory `aws-apn-id` tag to every resource. If your account restricts tag keys with an SCP or IAM policy, allow `aws-apn-id` before you apply, or the upgrade will fail. See [Use custom tags](/docs/admin/self-hosting/deploy#use-custom-tags).
    </Warning>

    <Warning>
      If your deployment runs the API on [ECS](/docs/admin/self-hosting/upgrade/v6) (`enable_ecs_api = true`), upgrade to AWS Terraform module v6.5.0 or later. On v6.4.0 and earlier, running the API on ECS also sends LLM calls from user-authored scorers and tools to the Braintrust-hosted Gateway, outside your AWS account. See [Upgrade to Terraform module v6](/docs/admin/self-hosting/upgrade/v6).
    </Warning>

    <Warning>
      AWS Terraform module v6.7.0 removes the `enable_brainstore` variable. Brainstore is always enabled, and there is no opt-out. If your configuration sets `enable_brainstore`, delete the line before you apply, or the plan fails with an unsupported argument error.
    </Warning>

    <Warning>
      After applying AWS Terraform module v6.8.0, downgrading to v6.7.x or earlier destroys and recreates API ECS listener rules, which can disrupt traffic. Review the Terraform plan before any rollback. See the [v6.8.0 release notes](/docs/data-plane-changelog#terraform-aws-module-releases).
    </Warning>

    ## 2. Review and apply

    <Note>
      As of v5.6.0, the `modules/services` sub-module requires the `hashicorp/http` provider `~> 3.3`. If your `.terraform.lock.hcl` pins an older 3.x version, run `terraform init -upgrade` before `terraform plan` or `terraform apply`.
    </Note>

    Review the planned changes before applying:

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
    terraform plan
    ```

    <Warning>
      Carefully review the output of `terraform plan` before applying. If you see something unexpected, like deletion of a database or S3 bucket, [contact Braintrust](mailto:support@braintrust.dev) for help.
    </Warning>

    Apply the changes:

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
    terraform apply
    ```

    This updates both the infrastructure and the data plane components in a single apply.
  </Tab>

  <Tab title="GCP" icon="https://img.logo.dev/cloud.google.com?token=pk_BdcHD9e5SCW3j1rnJkNyMQ">
    This guide shows the routine process for upgrading the Braintrust data plane in your GCP account.

    ## How it works

    GCP deployments have two independently upgradeable components:

    * **Terraform module** (`terraform-google-braintrust-data-plane`): provisions your cloud infrastructure — the GKE cluster, Cloud SQL database, Redis, and storage buckets. You upgrade this by changing the `?ref=` version in your module source and running `terraform apply`.

    * **Helm chart**: deploys the Braintrust application (API and Brainstore containers) onto your GKE cluster. You upgrade this by running `helm upgrade` with a new `--version`.

    <Note>
      The Helm chart `--version` is the chart version, not the data plane version. The data plane version is set separately via image tags in your `values.yaml`. Upgrading the Helm chart alone does not change which data plane version is running — you must also update the image tags.
    </Note>

    To check which data plane version you're currently running, go to **<Icon icon="settings-2" /> Settings** > [**<Icon icon="lock" /> Data plane**](https://www.braintrust.dev/app/~/configuration/org/api-url) in the Braintrust UI.

    ## 1. Decide what to upgrade

    Before upgrading, check the [Self-hosting releases](/docs/data-plane-changelog) page for your target data plane version. Each entry specifies its requirements:

    * **"Requires: Helm X.Y.Z+"** — you must upgrade the Helm chart to at least that version before or alongside updating your image tags. Update Terraform first if infrastructure changes are also listed.
    * **No requirements listed** — you can upgrade by updating image tags in `values.yaml` and running `helm upgrade`. No Terraform or chart version change needed.
    * **Helm-only release ("No data plane version change")** — update only the Helm chart version. No image tag change needed.

    ## 2. Update infrastructure (Terraform)

    Run this step when a release lists infrastructure requirements, or when you want to apply infrastructure changes independently.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
    terraform apply
    ```

    <Warning>
      Carefully review the output of `terraform plan` before applying any changes to your deployment. If you see something unexpected, like deletion of a database or storage bucket, [contact Braintrust](mailto:support@braintrust.dev) for help.
    </Warning>

    To pin to a specific Terraform module version, update the `?ref=` in your module source:

    ```hcl theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
    module "braintrust-data-plane" {
      source = "github.com/braintrustdata/terraform-google-braintrust-data-plane?ref=vX.Y.Z"

      # ... other configuration ...
    }
    ```

    See all module releases: [GitHub Releases](https://github.com/braintrustdata/terraform-google-braintrust-data-plane/releases)

    ## 3. Update services (Helm)

    Run this step to deploy a new data plane version or apply a Helm chart update.

    <Steps>
      <Step title="Set the data plane version">
        Set the data plane version by updating the image tags for the API and Brainstore in your `values.yaml`. Refer to the [Helm chart values reference](https://github.com/braintrustdata/helm/blob/main/braintrust/values.yaml) for the exact field names.
      </Step>

      <Step title="Upgrade the Helm chart">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
        helm upgrade braintrust \
          oci://public.ecr.aws/braintrust/helm/braintrust \
          --namespace braintrust \
          --version <chart-version> \
          --values helm-values.yaml
        ```

        Replace `<chart-version>` with the Helm chart version required by the release (or your current chart version if no chart upgrade is needed).

        <Note>
          When a release requires both Terraform and Helm changes, apply Terraform first, then run the Helm upgrade.
        </Note>

        See all Helm chart releases: [GitHub Releases](https://github.com/braintrustdata/helm/releases)
      </Step>
    </Steps>
  </Tab>

  <Tab title="Azure" icon="https://img.logo.dev/azure.microsoft.com?token=pk_BdcHD9e5SCW3j1rnJkNyMQ">
    This guide shows the routine process for upgrading the Braintrust data plane in your Azure account.

    ## How it works

    Azure deployments have two independently upgradeable components:

    * **Terraform module** (`terraform-azure-braintrust-data-plane`): provisions your cloud infrastructure — the AKS cluster, Azure Database for PostgreSQL, Redis, and storage. You upgrade this by changing the `?ref=` version in your module source and running `terraform apply`.

    * **Helm chart**: deploys the Braintrust application (API and Brainstore containers) onto your AKS cluster. You upgrade this by running `helm upgrade` with a new `--version`.

    <Note>
      The Helm chart `--version` is the chart version, not the data plane version. The data plane version is set separately via image tags in your `values.yaml`. Upgrading the Helm chart alone does not change which data plane version is running — you must also update the image tags.
    </Note>

    To check which data plane version you're currently running, go to **<Icon icon="settings-2" /> Settings** > [**<Icon icon="lock" /> Data plane**](https://www.braintrust.dev/app/~/configuration/org/api-url) in the Braintrust UI.

    ## 1. Decide what to upgrade

    Before upgrading, check the [Self-hosting releases](/docs/data-plane-changelog) page for your target data plane version. Each entry specifies its requirements:

    * **"Requires: Helm X.Y.Z+"** — you must upgrade the Helm chart to at least that version before or alongside updating your image tags. Update Terraform first if infrastructure changes are also listed.
    * **No requirements listed** — you can upgrade by updating image tags in `values.yaml` and running `helm upgrade`. No Terraform or chart version change needed.
    * **Helm-only release ("No data plane version change")** — update only the Helm chart version. No image tag change needed.

    ## 2. Update infrastructure (Terraform)

    Run this step when a release lists infrastructure requirements, or when you want to apply infrastructure changes independently.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
    terraform apply
    ```

    <Warning>
      Carefully review the output of `terraform plan` before applying any changes to your deployment. If you see something unexpected, like deletion of a database or storage account, [contact Braintrust](mailto:support@braintrust.dev) for help.
    </Warning>

    To pin to a specific Terraform module version, update the `?ref=` in your module source:

    ```hcl theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
    module "braintrust-data-plane" {
      source = "github.com/braintrustdata/terraform-azure-braintrust-data-plane?ref=vX.Y.Z"

      # ... other configuration ...
    }
    ```

    See all module releases: [GitHub Releases](https://github.com/braintrustdata/terraform-azure-braintrust-data-plane/releases)

    <Note>
      Some Terraform Azure module upgrades include one-time breaking changes, such as renamed node pool variables, an azurerm provider upgrade, or a Terraform state migration. Before bumping the module across major versions, review the **Terraform Azure module releases** entries on the [Self-hosting releases](/docs/data-plane-changelog) page for the versions you're crossing.
    </Note>

    ## 3. Update services (Helm)

    Run this step to deploy a new data plane version or apply a Helm chart update.

    <Steps>
      <Step title="Set the data plane version">
        Set the data plane version by updating the image tags for the API and Brainstore in your `values.yaml`. Refer to the [Helm chart values reference](https://github.com/braintrustdata/helm/blob/main/braintrust/values.yaml) for the exact field names.
      </Step>

      <Step title="Upgrade the Helm chart">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
        helm upgrade braintrust \
          oci://public.ecr.aws/braintrust/helm/braintrust \
          --namespace braintrust \
          --version <chart-version> \
          --values helm-values.yaml
        ```

        Replace `<chart-version>` with the Helm chart version required by the release (or your current chart version if no chart upgrade is needed).

        <Note>
          When a release requires both Terraform and Helm changes, apply Terraform first, then run the Helm upgrade.
        </Note>

        See all Helm chart releases: [GitHub Releases](https://github.com/braintrustdata/helm/releases)
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Next steps

* [Self-hosting releases](/docs/data-plane-changelog) — review release notes and infrastructure requirements for each data plane version
* [Configuration](/docs/admin/self-hosting/configure) — configure telemetry, network access, rate limiting, and other options
