Terraform Provider reference
Resources and data sources available through the Terraform Provider
The Terraform Provider provides access to resources and data sources. Resources are infrastructure objects, such as a Supabase project, that you can declaratively configure. Data sources are sources of information about your Supabase instances.
Provider settings#
Use these settings to configure your Supabase provider and authenticate to your Supabase project.
Example usage#
1provider "supabase" {
2 access_token = ""
3 endpoint = ""
4}Details#
| Attribute | Description | Type | Optional | Sensitive |
|---|---|---|---|---|
| access_token | Supabase access token. Can also be set via the | string | true | true |
| endpoint | Supabase API endpoint. Can also be set via the | string | true |
Resources#
You can configure these resources using the Supabase Terraform provider:
Example usage#
1resource "supabase_apikey" "<label>" {
2 description = ""
3 name = ""
4 project_ref = ""
5}Details#
| Attribute | Description | Type | Required | Optional | Read-only |
|---|---|---|---|---|---|
api_key | API key | string | true | ||
description | Description of the API key | string | true | ||
id | API key identifier | string | true | ||
name | Name of the API key | string | true | ||
project_ref | Project reference ID | string | true | ||
secret_jwt_template | Secret JWT template | true | |||
type | Type of the API key | string | true |
Data sources#
You can read these resources using the Supabase Terraform provider:
Example usage#
1resource "supabase_apikeys" "all" {
2 project_ref = ""
3}Details#
| Attribute | Description | Type | Required | Optional | Read-only |
|---|---|---|---|---|---|
anon_key | Anonymous API key for the project | string | true | ||
project_ref | Project reference ID | string | true | ||
publishable_key | Publishable API key for the project | string | true | ||
secret_keys | List of secret API keys for the project | true | |||
service_role_key | Service role API key for the project | string | true |