-
-
Notifications
You must be signed in to change notification settings - Fork 14
feat: allow updating a project's instance size #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: allow updating a project's instance size #255
Conversation
6719d52 to
b2b3093
Compare
b2b3093 to
f9459b5
Compare
| // Read Terraform plan data into the model | ||
| resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) | ||
| resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) | ||
| resp.Diagnostics.Append(req.State.Get(ctx, &state)...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we ignore values in the current state? I believe TF client will handle this comparison.
| return diag.Diagnostics{diag.NewErrorDiagnostic("Client Error", msg)} | ||
| } | ||
|
|
||
| if addonsResp.JSON200 != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's bubble up errors here
| var freeInstanceSizes = []string{ | ||
| string(api.V1CreateProjectBodyDesiredInstanceSizeNano), | ||
| string(api.V1CreateProjectBodyDesiredInstanceSizePico), | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this check to api side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On closer look, we need to call the api to remove compute addon if user specifies nano or pico compute size. https://api.supabase.com/api/v1#tag/billing/delete/v1projectsrefbillingaddonsaddon_variant
What kind of change does this PR introduce?
feature
What is the current behavior?
Changing
instance_sizeis not supported.Attempting to do so results in the following error:
Update is not supported for project resource: <project>What is the new behavior?
Plans like this are supported