Add max_terraform_state_size_bytes to the app settings API
What does this MR do and why?
We introduced a limit to the file/data accepted by the POST /projects/:project_id/terraform/state/:name
API in the application_settings
table, with the new field called as max_terraform_state_size_bytes
. (See !106257 (merged))
Here, the new field is added to the GET /application/settings
and PUT /application/settings
endpoints.
This should wait for !106269 (merged) to be merged.
Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/352951
Screenshots or screen recordings
GET /application/settings
PUT /application/settings
Documentation
How to set up and validate locally
-
Make sure you have a user with admin access to a GitLab instance
-
Create a Personal Access Token for that user, make sure it has the
sudo
scope -
Run the following curl requests:
GET application settings
curl -k -X GET \ --header "Authorization: Bearer <your personal access token>" \ "<gitlab-instance-url>/api/v4/application/settings"
PUT application settings
curl \ "<gitlab-instance-url>/api/v4/application/settings" \ -ki -X PUT \ --header "Authorization: Bearer <your personal access token>" \ --header "Content-Type: application/json" \ --data "{\"max_terraform_state_size_bytes\":1000}"
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.