Missing Supabase API Documentation
Where are the API docs for https://api.supabase.com/api/v1#/projects%20config ?
The terraform provider uses these endpoints, and because the provider doesn't explicitly list what properties are valid for settings and requires JSON, we need a documentation reference!
14 Replies
smh. @inder show me where
projects config
endpoint is on that page pleaseDid see the url that's why linked you to management api.
https://supabase.com/docs/reference/api/v1-create-a-project

that's literally not the url
you don't seem to be understanding the difference between the management API endpoints and what the terraform provider has in its documentation. here's a link https://github.com/supabase/terraform-provider-supabase/blob/a5e4faa1a493b07a004246ba16aaacb59b3cc68e/internal/provider/settings_resource.go#L87
GitHub
terraform-provider-supabase/internal/provider/settings_resource.go ...
Contribute to supabase/terraform-provider-supabase development by creating an account on GitHub.
I called that out in my OP, perhaps you missed that part
In the pulumi documentation, it mentions that each service needs serializable json https://www.pulumi.com/registry/packages/supabase/api-docs/settings/#inputs. And as pulumi builds on terraform, I believe this is the json which can be passed
https://supabase.com/docs/reference/api/v1-update-auth-service-config https://supabase.com/docs/reference/api/v1-update-postgres-config https://supabase.com/docs/reference/api/v1-update-storage-config https://supabase.com/docs/reference/api/v1-upgrade-postgres-version don't know specifically about terraform so won't be of any help there
https://supabase.com/docs/reference/api/v1-update-auth-service-config https://supabase.com/docs/reference/api/v1-update-postgres-config https://supabase.com/docs/reference/api/v1-update-storage-config https://supabase.com/docs/reference/api/v1-upgrade-postgres-version don't know specifically about terraform so won't be of any help there
I agree the SB Terraform docs such as they are seem to be linking to the API management pages even though the URL shown in that config page is different than the exact ones for API management.
The docs are fine. I believe the link added in the Markdown Description field should be changed because in the test file the actual url used is the same as on management api page. https://github.com/supabase/terraform-provider-supabase/blob/a5e4faa1a493b07a004246ba16aaacb59b3cc68e/internal/provider/settings_resource_test.go#L16. these links are used for generating terraform docs so links are broken there.
It should either be linked to the management api update-config link I mentioned in the last message or this one https://api.supabase.com/api/v1/#tag/auth/patch/v1/projects/{ref}/config/auth
For future readers, I tested deploying supabase with pulumi and indeed management api is the correct source. The url which OP talks about is maybe old, there is no clarity on that. But it is invalid. So you don't have to shake your heads and you should look at the management api docs or in the openapi docs search for
update config
and that should give you the valid endpoints with valid json fields
Example code with pulumi
I'm writing a new terraform provider for supabase, since that's the source of confusion. Not sure why that was released in that condition, but here we are.
Seems to me the only issue is with the docs link. Also another user pointed out the broken docs link here https://github.com/supabase/terraform-provider-supabase/issues/227
But I don't use terraform so could be wrong. Pulumi worked flawlessly
the provider is fundamentally flawed because it provides no type checking - only accepts JSON strings. Pulumi and CDKTF operate along the same lines. additionally they dont provide access to manage functions, buckets, webhooks, etc.
Yeah doesn't provide access for functions, surprising as there are already endpoints for CRUD operations for functions. If you're working on a custom provider, maybe build on top of this one and open a PR
my dude I've already released it. they haven't looked at that repo in 7 months, a PR that is fundamentally a new project isn't gonna get eyeballs lol