Terraform Provider
The Supabase Provider allows Terraform to manage resources hosted on Supabase platform.
You may use this provider to version control your project settings or setup CI/CD pipelines for automatically provisioning projects and branches.
This simple example imports an existing Supabase project and synchronises its API settings.
source = "supabase/supabase"
access_token = file("${path.module}/access-token")
# Define a linked project variable as user input
variable "linked_project" {
# Import the linked project resource
to = supabase_project.production
resource "supabase_project" "production" {
organization_id = "nknnyrtlhxudbsbuazsu"
database_password = "tf-example"
region = "ap-southeast-1"
ignore_changes = [database_password]
# Configure api settings for the linked project
resource "supabase_settings" "production" {
project_ref = var.linked_project
db_schema = "public,storage,graphql_public"
db_extra_search_path = "public,extensions"