Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Managed Service for GitLab
  • Getting started
    • All guides
    • Getting information about instances
    • Creating and activating an instance
    • Setting up security groups and access restrictions to an instance
    • Stopping and starting an instance
    • Editing instance settings
    • Managing backups
    • Migrating from a custom GitLab installation
    • Migrating to a different availability zone
    • Cleaning up full disk space
    • Deleting an instance
    • Adding and removing users from a project
    • Setting up approval rules
    • Monitoring the instance status
    • Setting up OmniAuth
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Creating a GitLab instance
  • Activating the GitLab instance
  1. Step-by-step guides
  2. Creating and activating an instance

Creating and activating a Managed Service for GitLab instance

Written by
Yandex Cloud
Improved by
Danila N.
Updated at August 6, 2025
  • Creating a GitLab instance
  • Activating the GitLab instance

Creating a GitLab instanceCreating a GitLab instance

To create a Managed Service for GitLab instance, you need the vpc.user role and the gitlab.editor role or higher. For more information on assigning roles, see the Identity and Access Management documentation.

Warning

Once you have created an instance, you cannot change its network configuration, i.e., availability zone and subnet.

Management console
CLI
Terraform
API
  1. In the management console, select the folder where you want to create a GitLab instance.

  2. Select Managed Service for GitLab.

  3. Click Create instance.

  4. At the top of the page:

    1. Enter the instance name. It must be unique throughout Yandex Cloud.

      • 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.
    2. (Optional) Enter a description of the instance.

    3. (Optional) Add tags to break instances into logical groups.

    4. (Optional) Set instance protection against accidental deletion by the user.

  5. Under Configuration:

    1. Select the instance type. After you create an instance, you can change its type to a higher performing one.

    2. Specify the availability zone. After you create an instance, you cannot change its availability zone.

    3. Specify the subnet where the instance will be hosted. Currently, Yandex Cloud technical restrictions do not allow selecting a subnet with the 192.168.0.0/24 address range.

    4. Select a security group or create a new one:

      1. Click Create group.
      2. Enter a name and description for the security group. You can add rules for the security group later in Virtual Private Cloud.
      3. 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.

    5. Select the disk size. After you create an instance, you can increase its disk size.

    6. Specify the instance domain name: relevant DNS records will be automatically created for it in the .gitlab.yandexcloud.net domain.

      The domain name must be unique throughout Yandex Cloud.

      • Its length must be between 5 and 50 characters.
      • It may contain lowercase Latin letters, numbers, and hyphens.
      • It must not start or end with a dash character.
    7. Set up the retention period for automatic backups (in days).

    8. (Optional) Enable code approval rules. To do this, select the appropriate configuration for approval rules.

      Note

      The configuration you select affects the cost of using the instance's computing resources.

  6. Under Administrator data, specify:

    • Email: Email address of the GitLab instance administrator. This is the address to receive the email with a link to create a password.
    • Login: Administrator login.
  7. (Optional) Under Advanced settings, enable deletion of untagged images. This setting affects the amount of free disk space on the instance.

  8. Click Create.

  9. Wait for the instance to get ready: its status on the Managed Service for GitLab dashboard will change to Running. This may take some time.

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.

  1. See the description of the CLI command for creating a Managed Service for GitLab instance:

    yc managed-gitlab instance create --help
    
  2. Select a subnet:

    yc vpc subnet list
    

    Result:

    +----------------------+---------------------------+----------------------+----------------+-------------------+-----------------+
    |          ID          |           NAME            |      NETWORK ID      | ROUTE TABLE ID |       ZONE        |      RANGE      |
    +----------------------+---------------------------+----------------------+----------------+-------------------+-----------------+
    | e9bnlm18l70a******** |   default-ru-central1-a   | enpe3m3fa00u******** |                |   ru-central1-a   | [10.128.0.0/24] |
    +----------------------+---------------------------+----------------------+----------------+-------------------+-----------------+
    
  3. Create a GitLab instance (this example does not use all available parameters):

    yc managed-gitlab instance create \
      --name first-instance \
      --resource-preset-id <host_class> \
      --disk-size <disk_size_in_GB> \
      --admin-login <admin_login> \
      --admin-email <admin_email_address> \
      --domain-prefix <instance_domain_name> \
      --deletion-protection \
      --approval-rules <approval_rule_configuration> \
      --subnet-id <subnet_ID>
    

    Where:

    • --name: 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 RAM
      • s2.small: 4 vCPUs, 16 GB RAM
      • s2.medium: 8 vCPUs, 32 GB RAM
      • s2.large: 16 vCPUs, 64 GB RAM
    • --disk-size: Disk size in GB.

    • --admin-login: GitLab instance admin login.

    • --admin-email: Instance admin email address. This is the address to receive the email with a link to create a password.

    • --domain-prefix: Instance domain name. The system will automatically create the relevant DNS records for it in the .gitlab.yandexcloud.net domain.

      The domain name must be unique throughout Yandex Cloud.

      • Its length must be between 5 and 50 characters.
      • It may contain lowercase Latin letters, numbers, and hyphens.
      • It must not start or end with a dash character.
    • --deletion-protection: Instance protection against accidental deletion by the user.

    • --approval-rules: Approval rule configuration. The possible values are:

      • BASIC
      • STANDARD
      • ADVANCED

      Note

      The configuration you select affects the cost of using the instance's computing resources.

    • --subnet-id: ID of the selected subnet.

    Result:

    id: c17c60tpadua********
    folder_id: b1g2slt7p9ug********
    created_at: "2025-07-20T18:34:16.078Z"
    updated_at: "2025-07-20T18:34:16.078Z"
    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.6
    

    For more information about this command, see the CLI reference.

With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it using configuration files. These files store the infrastructure description written in HashiCorp Configuration Language (HCL). If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.

Terraform is distributed under the Business Source License. The Yandex Cloud provider for Terraform is distributed under the MPL-2.0 license.

For more information about the provider resources, see the relevant documentation on the Terraform website or its mirror.

If you do not have Terraform yet, install it and configure the Yandex Cloud provider.

To create a GitLab instance:

  1. In the Terraform configuration file, describe the resources you want to create:

    resource "yandex_gitlab_instance" "my_gitlab_instance" {
      name                      = "<instance_name>"
      resource_preset_id        = "<host_class>"
      disk_size                 = <disk_size_in_GB>
      admin_login               = "<admin_login>"
      admin_email               = "<admin_email_address>"
      domain                    = "<instance_domain_name>"
      subnet_id                 = "<subnet_ID>"
      approval_rules_id         = "<approval_rule_configuration>"
      backup_retain_period_days = <backup_retention_period>
      deletion_protection       = <true_or_false>
    }
    

    Where:

    • name: 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 RAM
      • s2.small: 4 vCPUs, 16 GB RAM
      • s2.medium: 8 vCPUs, 32 GB RAM
      • s2.large: 16 vCPUs, 64 GB RAM
    • disk_size: Disk size in GB.

    • admin_login: GitLab instance admin login.

    • admin_email: Instance admin email address. This is the address to receive the email with a link to create a password.

    • domain: Instance domain name in <name>.gitlab.yandexcloud.net format. The system will automatically create the relevant DNS records for it in the .gitlab.yandexcloud.net domain.

      The domain name must be unique throughout Yandex Cloud.

      • Its length must be between 5 and 50 characters.
      • It may contain lowercase Latin letters, numbers, and hyphens.
      • It must not start or end with a dash character.
    • subnet_id: ID of the selected subnet.

    • approval_rules_id: Approval rule configuration. The possible values are:

      • BASIC
      • STANDARD
      • ADVANCED

      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 are true or false.

    For more information about yandex_gitlab_instance properties, see the relevant provider documentation.

  2. Create the resources:

    1. In the terminal, go to the directory where you edited the configuration file.

    2. Make sure the configuration file is correct using this command:

      terraform validate
      

      If the configuration is correct, you will get this message:

      Success! The configuration is valid.
      
    3. Run this command:

      terraform plan
      

      You will see a detailed list of resources. No changes will be made at this step. If the configuration contains any errors, Terraform will show them.

    4. Apply the changes:

      terraform apply
      
    5. Type yes and press Enter to confirm the changes.

    Terraform will create all the required resources. You can check the new resources using the management console or this CLI command:

    yc managed-gitlab instance list
    

Use the Create REST API method for the Instance resource or the InstanceService/Create gRPC API call.

Note

When you create an instance in Managed Service for GitLab, it automatically generates an SSL certificate. No additional configuration for using HTTPS is required.

Activating the GitLab instanceActivating the GitLab instance

After the instance status changes to Running, activate the instance:

  1. Follow the link you received in your administrator mailbox after creating the instance.

    If you cannot open the GitLab web interface, create a separate security group and configure it so that the rules allow incoming traffic from the required ports and IP addresses.

  2. Change the administrator password.

  3. Log in using the administrator username and password.

Further on, to open the GitLab web interface, get detailed information about your instance and follow the link in Domain.

Was the article helpful?

Previous
Getting information about instances
Next
Setting up security groups and access restrictions to an instance
© 2025 Direct Cursus Technology L.L.C.