[Yandex Cloud documentation](../../../index.md) > [Yandex Managed Service for GitLab](../../index.md) > [Step-by-step guides](../index.md) > Getting instance info

# Getting Yandex Managed Service for GitLab instance info

You can get detailed information about each [GitLab instance](../../concepts/index.md#instance) you created in Yandex Cloud.

## Getting a list of instances in a folder {#list}

{% list tabs group=instructions %}

- Management console {#console}

  Navigate to **Managed Service for&nbsp;GitLab**.

- CLI {#cli}

    If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

    The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

    To get a list of available GitLab instances in the default folder, run this command:

    ```bash
    yc managed-gitlab instance list
    ```

    Result:

    ```bash
    +----------------------+-------+-------------------------------+---------------------+---------------------+----------------+---------+
    |          ID          | NAME  |            DOMAIN             |     CREATED AT      |     UPDATED AT      | GITLAB VERSION | STATUS  |
    +----------------------+-------+-------------------------------+---------------------+---------------------+----------------+---------+
    | c17gehgsk7gq******** | my-gl | domain.gitlab.yandexcloud.net | 2025-06-10 12:10:55 | 2025-06-10 12:10:55 | 17.11.2        | RUNNING |
    +----------------------+-------+-------------------------------+---------------------+---------------------+----------------+---------+
    ```

    Where:

    * `ID`: Instance ID.
    * `NAME`: Instance name.
    * `DOMAIN`: Instance address on the internet.
    * `CREATED AT`: Date and time when the instance was created.
    * `UPDATED AT`: Date and time when the instance was updated.
    * `GITLAB VERSION`: GitLab version.
    * `STATUS`: Instance status. Learn more about possible statuses [here](monitoring.md#statuses).

    For more information about this command, see the [CLI reference](../../cli-ref/instance/list.md).

- API {#api}

  Use the [List](../../api-ref/Instance/list.md) REST API method for the [Instance](../../api-ref/Instance/index.md) resource or the [InstanceService/List](../../api-ref/grpc/Instance/list.md) gRPC API call.

{% endlist %}

## Getting instance details {#get}

Instance details include:
* Domain.
* Status.
* Resources: RAM, vCPU, and disk size.
* Admin's login and email address.

{% list tabs group=instructions %}

- Management console {#console}

  1. In the management console, select the [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder) containing your GitLab instance.
  1. Navigate to **Managed Service for&nbsp;GitLab**.
  1. Click the instance name.

- CLI {#cli}

    If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

    The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

    To get details for a GitLab instance, run this command:

    ```bash
    yc managed-gitlab instance get <instance_name_or_ID>
    ```
    
    Result:

    ```bash
    id: c17gehgsk7gq********
    folder_id: b1gutjgdvq50********
    created_at: "2025-06-10T12:10:55.902Z"
    updated_at: "2025-06-10T12:10:55.902Z"
    name: my-gl
    resource_preset_id: s2.micro
    disk_size: "32212254720"
    status: RUNNING
    admin_login: my-login
    admin_email: admin@mail.ru
    domain: domain.gitlab.yandexcloud.net
    subnet_id: e9bk8uu1lv1sg********
    backup_retain_period_days: "7"
    maintenance_delete_untagged: true
    deletion_protection: true
    approval_rules_id: NONE
    gitlab_version: 17.11.2
    ```

    Where:

    * `id`: Instance ID.
    * `folder_id`: ID of the [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder) containing the instance.
    * `created_at`: Date and time when the instance was created.
    * `updated_at`: Date and time when the instance was updated.
    * `name`: Instance name.
    * `resource_preset_id`: [Instance type](../../concepts/index.md#config) ID.
    * `disk_size`: Disk size.
    * `status`: Instance status. Learn more about possible statuses [here](monitoring.md#statuses).
    * `admin_login`: Administrator login.
    * `admin_email`: Administrator email address.
    * `domain`: Instance address on the internet.
    * `subnet_id`: [Subnet](../../../vpc/concepts/network.md#subnet) ID.
    * `backup_retain_period_days`: Backup retention period, in days.
    * `maintenance_delete_untagged`: Enables deletion of untagged images during maintenance. The possible values are `true` or `false`.
    * `deletion_protection`: Instance protection from accidental deletion by a user. The possible values are `true` or `false`.
    * `approval_rules_id`: Approval rules. Learn more about supported rule configurations [here](../../concepts/approval-rules.md#packages).
    * `gitlab_version`: GitLab version.

    You can get the instance name and ID with the [list of instances in the folder](instance-list.md#list).

    For more information about this command, see the [CLI reference](../../cli-ref/instance/get.md).

- Terraform

  With [Terraform](https://www.terraform.io/), 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](https://github.com/hashicorp/terraform/blob/main/LICENSE). The [Yandex Cloud provider for Terraform](https://github.com/yandex-cloud/terraform-provider-yandex) is distributed under the [MPL-2.0](https://www.mozilla.org/en-US/MPL/2.0/) license.
  
  For more information about the provider resources, see the guides on the [Terraform](https://www.terraform.io/docs/providers/yandex/index.html) website or [its mirror](../../../terraform/index.md).

  If you do not have Terraform yet, [install it and configure the Yandex Cloud provider](../../../tutorials/infrastructure-management/terraform-quickstart.md#install-terraform).
  
  
  To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), [authenticate](../../../terraform/authentication.md) using the appropriate method.

  To get information about a GitLab instance using Terraform:

  1. Add the `data` and `output` sections to the Terraform configuration file:

      ```hcl
      data "yandex_gitlab_instance" "gitlab_instance_by_id" {
        id = "<instance_ID>"
      }

      output "instance_domain" {
        value = data.yandex_gitlab_instance.gitlab_instance_by_id.domain
      }
      ```

      Where:

      * `data "yandex_gitlab_instance"`: GitLab instance description as a data source:
         * `id`: GitLab instance ID.
      * `output "instance_domain"`: Output variable that contains information about the domain:
         * `value`: Return value.

     You can replace `domain` with another variable to get the information you need. For more on the properties of the `gitlab_instance` data source, see [this provider guide](../../../terraform/data-sources/gitlab_instance.md).

  1. Apply the configuration:

      1. In the terminal, navigate to the configuration file directory.
      1. Make sure the configuration is correct using this command:
      
         ```bash
         terraform validate
         ```
      
         If the configuration is valid, you will get this message:
      
         ```bash
         Success! The configuration is valid.
         ```
      
      1. Run this command:
      
         ```bash
         terraform plan
         ```
      
         You will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
      1. Apply the configuration changes:
      
         ```bash
         terraform apply
         ```
      
      1. Type `yes` and press **Enter** to confirm the changes.

      Terraform will apply the configuration and display output variables in the terminal. To check the results, run this command:

      ```bash
      terraform output
      ```

      Result:

      ```text
      instance_domain = example.gitlab.yandexcloud.net
      ```

- API {#api}

  Use the [Get](../../api-ref/Instance/get.md) REST API method for the [Instance](../../api-ref/Instance/index.md) resource or the [InstanceService/Get](../../api-ref/grpc/Instance/get.md) gRPC API call.

{% endlist %}

## Viewing a list of operations in an instance {#list-operations}

The operation list shows operations with instances and related resources.

All actions with Managed Service for GitLab instances are logged as a list of operations. Each operation gets its own unique ID.

{% list tabs group=instructions %}

- Management console {#console}

  To get a list of operations for a specific instance:

  1. In the [management console](https://console.yandex.cloud), open the folder containing the cluster.
  1. Navigate to **Managed Service for&nbsp;GitLab**.
  1. In the left-hand panel, select ![image](../../../_assets/console-icons/server.svg) **Instances**.
  1. Select the instance you need.
  1. Navigate to the ![image](../../../_assets/console-icons/list-check.svg) **Operations** panel for the cluster you selected.

     This will open the list of operations with the instance.

{% endlist %}

## Getting operation details {#get-operation-info}

1. [Get the list of operations](#list-operations) for the instance.
1. Copy the ID of the operation you need.
1. Get the operation details:

    {% list tabs group=instructions %}

    - CLI {#cli}

      If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

      The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

      Run this command:

      ```bash
      yc operation get <operation_ID>
      ```

      Result:

      ```text
      id: c17de7epmui********
      description: Create automatic GitLab backup
      created_at: "2025-07-24T22:01:24.352Z"
      created_by: yc.managed-gitlab.serviceAccount
      modified_at: "2025-07-25T03:07:17.092Z"
      done: true
      metadata:
        '@type': type.googleapis.com/google.protobuf.Empty
      value: {}
      response:
        '@type': type.googleapis.com/yandex.cloud.gitlab.v1.Instance
      ...
      ```

    - API {#api}

      Use the [Get](../../api-ref/Operation/get.md) REST API method for the [Operation](../../api-ref/Operation/index.md) resource or the [OperationService/Get](../../api-ref/grpc/Operation/get.md) gRPC API call.

    {% endlist %}

#### Useful links {#see-also}

* [Working with operations](../../../api-design-guide/concepts/about-async.md)