The Bytebase Provider itself is free to use. Some advanced resource operations require Pro or Enterprise Plan.

Bytebase Terraform Provider handles control plane configuration such as settings, policies, access controls. It does not handle data plane operations such as database creation, schema migrations, DML execution, query.

Bytebase provides the Terraform Provider to let you manage your Bytebase resources via Terraform.

Terraform Provider → Bytebase Configuration
                      ├── Instances, Projects & Environments
                      ├── Access Policies
                      └── Settings such as Approval Workflows

Bytebase UI/API → Database Operations
                   ├── Database Creation
                   ├── Schema Migrations (DDL)
                   ├── Data Changes (DML)
                   └── Query

Create Service Account

The Terraform Provider uses service account to call the Bytebase API to manage the resources and settings.

After creating the service account, you can copy the service key as service_key and the email as service_account to initialize the Terraform provider in the next step.

service-account

Tutorials

Resources

Database

Project

Environment (Coming soon)

Access Control

IAM Policy

Data Masking

User & Group (Coming soon)

Workspace Settings

Troubleshoot

status: 404

This often happens when someone deletes the resources from the Bytebase UI and then attempts to run terraform apply.

To recover, please run terraform refresh to refresh the state first.

404