The Atlas Terraform Provider
The Atlas Terraform Provider enables you to manage your database schema as part of your Infrastructure-as-Code workflows using Terraform. With the provider, you can define your desired schema state and apply it to your database using Terraform resources.
Quick Start
Manage your database schema with Terraform: declare it, version it, and apply changes alongside the rest of your infrastructure.
Supported Workflows
Atlas supports versioned and declarative workflows. They are supported by theatlas_migration and atlas_schema resources respectively.
Versioned Migrations
Manage your schema changes through versioned migration files. Use the atlas migrate diff command to generate migrations, atlas migrate apply to apply them, and integrate Atlas into your CI/CD pipeline for safe, auditable deployments.
Declarative Migrations
Manage your schema declaratively by defining the desired state as code, and let Atlas plan and apply the changes using atlas schema apply. To review or approve changes before applying them, use atlas schema plan to pre-plan and approve migrations in advance.
Guides
Ad-hoc Approval
Learn how to support ad-hoc approvals for declarative schema changes.
Project Configuration
Learn how to use Atlas Project Configuration with the Atlas Terraform Provider.
Provisioning Named Databases
Provision schemas in managed databases like Amazon RDS or Cloud SQL with Terraform.
OpenTaco (Digger) Integration
Automate database schema migrations from pull requests using OpenTaco (Digger).