Editing instance settings
After creating a GitLab instance, you can edit the general and advanced instance settings yourself.
Changing general and advanced instance settings
-
In the management console, select the folder where the GitLab instance is located.
-
Select Managed Service for GitLab.
-
Select the instance and click
Edit at the top of the page. -
At the top of the page:
- Specify a new instance name and description.
- Add tags to break instances into logical groups.
- Set or remove instance protection against accidental deletion by the user.
-
Under Configuration:
-
Change the instance type. From the current instance type, you can only upgrade to a higher-performance type, e.g., from
s2.microtos2.small. You cannot downgrade to a lower-performance instance type. -
Select another security group or create a new one:
- Click Create group.
- Enter a name and description for the security group. You can add rules for the security group later in Virtual Private Cloud.
- Click Create.
If you do not specify a separate security group, the default security group created in the instance network will be used.
Configure your security group so that the rules allow incoming and outgoing traffic from the relevant ports and IP addresses.
Warning
The security group's setup determines the Managed Service for GitLab instance performance and availability.
If you have issues with setting up a security group, contact support
. -
Specify the disk size. You can increase the disk size or keep the same size. You cannot reduce the disk size.
-
Change the automatic backup retention period, in days.
-
Select the appropriate configuration for approval rules.
Note
The configuration you select affects the cost of using the instance's computing resources.
-
To activate the approval rules, specify a GitLab token.
-
-
Under Advanced settings, enable or disable deletion of untagged images. This setting affects the amount of free disk space on the instance.
-
Click Save.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
View the description of the CLI command to update the Managed Service for GitLab instance settings:
yc managed-gitlab instance update --help -
Update the GitLab instance settings (this example does not use all available parameters):
yc managed-gitlab instance update <instance_name_or_ID> \ --new-name <new_instance_name> \ --resource-preset-id <host_class> \ --disk-size <disk_size_in_GB> \ --deletion-protection \ --approval-rules <approval_rule_configuration>Where:
-
--new-name: New instance name, unique within Yandex Cloud. The naming requirements are as follows:- It must be from 2 to 63 characters long.
- It can only contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
--resource-preset-id: Host class. Represents the configuration of the virtual machine to host the GitLab instance. The possible values are:s2.micro: 2 vCPUs, 8 GB RAMs2.small: 4 vCPUs, 16 GB RAMs2.medium: 8 vCPUs, 32 GB RAMs2.large: 16 vCPUs, 64 GB RAM
-
--disk-size: Disk size in GB. -
--deletion-protection: Instance protection against accidental deletion by the user.Note
You can use the CLI to enable but not disable the accidental deletion protection.
-
--approval-rules: Approval rule configuration. The possible values are:BASICSTANDARDADVANCED
Note
The configuration you select affects the cost of using the instance's computing resources.
Result:
id: c17c60tpadua******** folder_id: b1g2slt7p9ug******** created_at: "2025-07-20T18:34:16.078Z" updated_at: "2025-07-20T18:54:49.829961285Z" name: test-cli resource_preset_id: s2.small disk_size: "107374182400" status: RUNNING admin_login: admin-gl admin_email: user@example.com domain: test-domain-user.gitlab.yandexcloud.net subnet_id: e9b4rrpuu2a******** backup_retain_period_days: "7" deletion_protection: true approval_rules_id: BASIC gitlab_version: 17.11.6For more information about this command, see the CLI reference.
-
-
Open the current Terraform configuration file that defines your infrastructure.
For more information about creating this file, see Creating a GitLab instance.
-
Change the parameter values in the GitLab instance description:
resource "yandex_gitlab_instance" "my_gitlab_instance" { ... resource_preset_id = "<host_class>" disk_size = <disk_size_in_GB> approval_rules_id = "<approval_rule_configuration>" backup_retain_period_days = <backup_retention_period> deletion_protection = <true_or_false> ... }Where:
-
resource_preset_id: Host class. Represents the configuration of the virtual machine to host the GitLab instance. The possible values are:s2.micro: 2 vCPUs, 8 GB RAMs2.small: 4 vCPUs, 16 GB RAMs2.medium: 8 vCPUs, 32 GB RAMs2.large: 16 vCPUs, 64 GB RAM
-
disk_size: Disk size in GB. -
approval_rules_id: Approval rule configuration. The possible values are:BASICSTANDARDADVANCED
Note
The configuration you select affects the cost of using the instance's computing resources.
-
backup_retain_period_days: Automatic backup retention period, in days. -
deletion_protection: Instance protection against accidental deletion by the user. The possible values aretrueorfalse.
For more information about
yandex_gitlab_instanceproperties, see the relevant provider documentation. -
-
Make sure the settings are correct.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
Terraform will update all the required resources. You can check the resource update using the management console
or this CLI command:yc managed-gitlab instance list -
For more information, see the Terraform provider documentation.
Use the Update REST API method for the Instance resource or the InstanceService/Update gRPC API call.