Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import {
}

resource "supabase_project" "production" {
# organization_id is your organization's slug (it can be found in the Supabase Dashboard under Organization Settings > Organization Details > Organization slug)
organization_id = "nknnyrtlhxudbsbuazsu"
name = "tf-project"
database_password = "tf-example"
Expand Down
11 changes: 11 additions & 0 deletions docs/resources/branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,14 @@ Read-Only:
- `status` (String) Status
- `user` (String) User
- `version` (String) Postgres version

## Import

Import is supported using the following syntax:

The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:

```shell
# The ID is the branch identifier.
terraform import supabase_branch.development <branch_id>
```
13 changes: 12 additions & 1 deletion docs/resources/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resource "supabase_project" "test" {

- `database_password` (String, Sensitive) Password for the project database
- `name` (String) Name of the project
- `organization_id` (String) Reference to the organization
- `organization_id` (String) Organization slug (found in the Supabase dashboard URL or organization settings)
- `region` (String) Region where the project is located

### Optional
Expand All @@ -46,3 +46,14 @@ resource "supabase_project" "test" {
### Read-Only

- `id` (String) Project identifier

## Import

Import is supported using the following syntax:

The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:

```shell
# The ID is the project reference.
terraform import supabase_project.production <project_ref>
```
11 changes: 11 additions & 0 deletions docs/resources/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,14 @@ resource "supabase_settings" "production" {
### Read-Only

- `id` (String) Project identifier

## Import

Import is supported using the following syntax:

The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:

```shell
# The ID is the project reference.
terraform import supabase_settings.production <project_ref>
```
2 changes: 1 addition & 1 deletion docs/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
},
"organization_id": {
"type": "string",
"description": "Reference to the organization",
"description": "Organization slug (found in the Supabase dashboard URL or organization settings)",
"description_kind": "markdown",
"required": true
},
Expand Down
2 changes: 2 additions & 0 deletions examples/resources/supabase_branch/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The ID is the branch identifier.
terraform import supabase_branch.development <branch_id>
2 changes: 2 additions & 0 deletions examples/resources/supabase_project/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The ID is the project reference.
terraform import supabase_project.production <project_ref>
2 changes: 2 additions & 0 deletions examples/resources/supabase_settings/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The ID is the project reference.
terraform import supabase_settings.production <project_ref>
2 changes: 1 addition & 1 deletion internal/provider/project_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (r *ProjectResource) Schema(ctx context.Context, req resource.SchemaRequest

Attributes: map[string]schema.Attribute{
"organization_id": schema.StringAttribute{
MarkdownDescription: "Reference to the organization",
MarkdownDescription: "Organization slug (found in the Supabase dashboard URL or organization settings)",
Required: true,
},
"name": schema.StringAttribute{
Expand Down