Skip to content

Commit

Permalink
feat: implement branch resource management (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge authored Feb 13, 2024
1 parent a509c11 commit 60f16c8
Show file tree
Hide file tree
Showing 6 changed files with 523 additions and 0 deletions.
51 changes: 51 additions & 0 deletions docs/resources/branch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "supabase_branch Resource - terraform-provider-supabase"
subcategory: ""
description: |-
Branch database resource
---

# supabase_branch (Resource)

Branch database resource

## Example Usage

```terraform
resource "supabase_branch" "new" {
parent_project_ref = "mayuaycdtijbctgqbycg"
git_branch = "main"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `git_branch` (String) Git branch
- `parent_project_ref` (String) Parent project ref

### Optional

- `region` (String) Database region

### Read-Only

- `database` (Attributes) Database connection details (see [below for nested schema](#nestedatt--database))
- `id` (String) Branch identifier

<a id="nestedatt--database"></a>
### Nested Schema for `database`

Read-Only:

- `host` (String) Host
- `id` (String) Branch project ref
- `jwt_secret` (String, Sensitive) JWT secret
- `password` (String, Sensitive) Password
- `port` (Number) Port
- `status` (String) Status
- `user` (String) User
- `version` (String) Postgres version
2 changes: 2 additions & 0 deletions examples/examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ var (
SettingsResourceConfig string
//go:embed resources/supabase_project/resource.tf
ProjectResourceConfig string
//go:embed resources/supabase_branch/resource.tf
BranchResourceConfig string
//go:embed data-sources/supabase_branch/data-source.tf
BranchDataSourceConfig string
)
4 changes: 4 additions & 0 deletions examples/resources/supabase_branch/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "supabase_branch" "new" {
parent_project_ref = "mayuaycdtijbctgqbycg"
git_branch = "main"
}
Loading

0 comments on commit 60f16c8

Please sign in to comment.