Skip to content

Commit ad024ff

Browse files
authored
docs: minor cleanup (#39)
1 parent 72ddc0d commit ad024ff

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
# Supabase Terraform Provider
22

3-
The [Supabase Provider](https://registry.terraform.io/providers/supabase/supabase/latest/docs) allows Terraform to manage resources hosted on [Supabase](https://supabase.com/) platform.
3+
The [Supabase Provider](https://registry.terraform.io/providers/supabase/supabase/latest/docs) allows Terraform to manage resources hosted on the [Supabase](https://supabase.com/) platform.
44

5-
You may use this provider to version control your project settings in git or setup CI/CD pipelines for automatically provisioning projects and branches.
5+
You can use this provider to:
6+
7+
- Version control your project settings in Git
8+
- Set up CI/CD pipelines for automatically provisioning projects and branches
9+
10+
## Resources and examples
611

712
- [Step-by-step tutorial](docs/tutorial.md)
813
- [CI/CD example](https://github.com/supabase/supabase-action-example/tree/main/supabase/remotes)
914
- [Contributing guide](CONTRIBUTING.md)
1015

11-
## Using the provider
16+
## Quickstart
1217

13-
This simple example imports an existing Supabase project and synchronises its API settings.
18+
This example imports an existing Supabase project and synchronises its API settings.
1419

1520
```hcl
1621
terraform {

docs/tutorial.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Setting up a TF module
44

5-
1. Create a Personal Access Token from Supabase Dashboard.
5+
1. Create a Personal Access Token in the [Supabase Dashboard](https://supabase.com/dashboard/account/tokens) by going to `Account preferences` > `Access Tokens`.
66
2. Save your access token locally to `access-token` file or a secure credentials store.
77
3. Create `module/provider.tf` with the following contents:
88

@@ -21,7 +21,7 @@ provider "supabase" {
2121
}
2222
```
2323

24-
Run the command `terraform -chdir=module apply` which should succeed in finding the provider.
24+
Run the command `terraform -chdir=module apply` to confirm that Terraform can find the provider.
2525

2626
## Creating a project
2727

@@ -43,13 +43,13 @@ resource "supabase_project" "production" {
4343
}
4444
```
4545

46-
Remember to substitue placeholder values with your own. For sensitive fields like password, you may consider retrieving it from a secure credentials store.
46+
Remember to substitute placeholder values with your own. For sensitive fields such as the password, consider storing and retrieving them from a secure credentials store.
4747

48-
Next, run `terraform -chdir=module apply` and confirm creating the new project resource.
48+
Next, run `terraform -chdir=module apply` to create the new project resource.
4949

5050
### Importing a project
5151

52-
If you have an existing project hosted on Supabase, you may import it into your local terraform state for tracking and management.
52+
If you have an existing project hosted on Supabase, you can import it into your local Terraform state for tracking and management.
5353

5454
Edit `module/resource.tf` with the following changes.
5555

@@ -77,13 +77,13 @@ resource "supabase_project" "production" {
7777
}
7878
```
7979

80-
Run `terraform -chdir=module apply` and you will be prompted to enter the reference ID of an existing Supabase project. If your local TF state is empty, your project will be imported from remote rather than recreated.
80+
Run `terraform -chdir=module apply`. Enter the ID of your Supabase project at the prompt. If your local TF state is empty, your project will be imported from remote rather than recreated.
8181

8282
Alternatively, you may use the `terraform import ...` command without editing the resource file.
8383

8484
## Configuring a project
8585

86-
Keeping your project settings in-sync is easy with the `supabase_settings` resource.
86+
Use the `supabase_settings` resource to manage your project settings.
8787

8888
Create `module/settings.tf` with the following contents.
8989

@@ -100,9 +100,9 @@ resource "supabase_settings" "production" {
100100
}
101101
```
102102

103-
Project settings don't exist on their own. They are created and destroyed together with their corresponding project resource referenced by the `project_ref` field. This means there is no difference between creating and updating `supabase_settings` resource while deletion is always a no-op.
103+
Project settings don't exist on their own. They are created and destroyed together with their corresponding project resource referenced by the `project_ref` field. This means there is no difference between creating and updating `supabase_settings` resource. Deletion is always a no-op.
104104

105-
You may declare any subset of fields to be managed by your TF module. The Supabase provider always performs a partial update when you run `terraform -chdir=module apply`. The underlying API call is also idempotent so it's safe to apply again if the local state is lost.
105+
You can declare any subset of fields to be managed by your TF module. The Supabase provider always performs a partial update when you run `terraform -chdir=module apply`. The underlying API call is also idempotent, so it's safe to apply again if the local state is lost.
106106

107107
To see the full list of settings available, try importing the `supabase_settings` resource instead.
108108

@@ -138,8 +138,8 @@ In addition, the `auth.site_url` settings of your branches will be customised to
138138

139139
## Committing your changes
140140

141-
Finally, you may commit the entire `module` directory to git for version control. This allows your CI runner to run `terraform apply` automatically on new config changes. Any command line variables can be passed to CI via `TF_VAR_*` environment variables instead.
141+
Finally, you can commit the entire `module` directory to Git for version control. This allows your CI runner to run `terraform apply` automatically on new config changes. Any command line variables can be passed to CI via `TF_VAR_*` environment variables.
142142

143143
## Resolving config drift
144144

145-
Tracking your configs in TF module does not mean that you lose the ability to change configs through the dashboard. However, doing so could introduce config drift that you need to resolve manually by adding them to your `*.tf` files.
145+
You can still change your configuration through the dashboard. However, making changes through both the dashboard and Terraform can introduce config drift. Resolve the drift by manually editing your `*.tf` files.

0 commit comments

Comments
 (0)