Skip to content

Commit 60f16c8

Browse files
authored
feat: implement branch resource management (#19)
1 parent a509c11 commit 60f16c8

File tree

6 files changed

+523
-0
lines changed

6 files changed

+523
-0
lines changed

docs/resources/branch.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "supabase_branch Resource - terraform-provider-supabase"
4+
subcategory: ""
5+
description: |-
6+
Branch database resource
7+
---
8+
9+
# supabase_branch (Resource)
10+
11+
Branch database resource
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "supabase_branch" "new" {
17+
parent_project_ref = "mayuaycdtijbctgqbycg"
18+
git_branch = "main"
19+
}
20+
```
21+
22+
<!-- schema generated by tfplugindocs -->
23+
## Schema
24+
25+
### Required
26+
27+
- `git_branch` (String) Git branch
28+
- `parent_project_ref` (String) Parent project ref
29+
30+
### Optional
31+
32+
- `region` (String) Database region
33+
34+
### Read-Only
35+
36+
- `database` (Attributes) Database connection details (see [below for nested schema](#nestedatt--database))
37+
- `id` (String) Branch identifier
38+
39+
<a id="nestedatt--database"></a>
40+
### Nested Schema for `database`
41+
42+
Read-Only:
43+
44+
- `host` (String) Host
45+
- `id` (String) Branch project ref
46+
- `jwt_secret` (String, Sensitive) JWT secret
47+
- `password` (String, Sensitive) Password
48+
- `port` (Number) Port
49+
- `status` (String) Status
50+
- `user` (String) User
51+
- `version` (String) Postgres version

examples/examples.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ var (
77
SettingsResourceConfig string
88
//go:embed resources/supabase_project/resource.tf
99
ProjectResourceConfig string
10+
//go:embed resources/supabase_branch/resource.tf
11+
BranchResourceConfig string
1012
//go:embed data-sources/supabase_branch/data-source.tf
1113
BranchDataSourceConfig string
1214
)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
resource "supabase_branch" "new" {
2+
parent_project_ref = "mayuaycdtijbctgqbycg"
3+
git_branch = "main"
4+
}

0 commit comments

Comments
 (0)