Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Compute Cloud
    • All guides
      • Creating a VM from a public image
      • Configuring software
      • Running a VM from a public image
      • Getting a list of public images
      • Getting information about a public image
    • Viewing operations with resources
  • Yandex Container Solution
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes

In this article:

  • Getting the ID of a public image
  • Getting information about a public image
  1. Step-by-step guides
  2. Images with pre-installed software
  3. Getting information about a public image

Getting information about a public image

Written by
Yandex Cloud
Updated at May 5, 2025
  • Getting the ID of a public image
  • Getting information about a public image

You can get the ID of a public image or other information about it.

Getting the ID of a public imageGetting the ID of a public image

Management console
CLI
Terraform
API
  1. In the management console, go to the folder you want to create a virtual machine in.
  2. Select Compute Cloud.
  3. At the top right, click Create resource.
  4. Select Virtual machine instance from the list that opens.
  5. Under Boot disk image, click next to the public image you need.
  6. Under Product IDs, you will see the public image ID: image_id.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. See the description of the CLI command for getting information about a public image of a disk:

    yc compute image get --help
    
  2. Get the public image ID by specifying the OS family name:

    yc compute image get-latest-from-family <family_name> --folder-id standard-images
    

    To learn the image family name, get a list of images in the folder.

    Result:

    id: fd85u0rct32prepgjlv0
    folder_id: standard-images
    created_at: "2024-03-11T10:57:40Z"
    name: ubuntu-22-04-lts-v20240311
    description: ubuntu 22.04 lts
    family: ubuntu-2204-lts
    storage_size: "7633633280"
    min_disk_size: "8589934592"
    product_ids:
      - f2ef01lju2nsansfdahf
    status: READY
    os:
      type: LINUX
    pooled: true
    

    You will find the public image ID in the id row.

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 documentation on the Terraform website or mirror website.

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

To get the ID of a public image using Terraform:

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

    data "yandex_compute_image" "my_image" {
      family = "<family_name>"
    }
    
    output "image" {
      value = data.yandex_compute_image.my_image.image_id
    }
    

    Where:

    • data "yandex_compute_image": Description of the public image as a data source:
      • family: Family name of public image operating systems. To learn the image family name, get a list of images in the folder.
    • output "image": Output variable storing the public image ID:
      • value: Returned value.

    For more information about the yandex_compute_image data source parameters, see the relevant provider documentation.

  2. Create the resources:

    1. In the terminal, change to the folder where you edited the configuration file.

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

      terraform validate
      

      If the configuration is correct, the following message is returned:

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

      terraform plan
      

      The terminal will display a list of resources with parameters. No changes are made at this step. If the configuration contains errors, Terraform will point them out.

    4. Apply the configuration changes:

      terraform apply
      
    5. Confirm the changes: type yes in the terminal and press Enter.

    Terraform will create all the required resources and display the output variable values in the terminal. To check the results, run this command:

    terraform output
    

    Result:

    image = "fd85u0rct32prepgjlv0"
    

To get the ID of a public image, use the get REST API method for the Image resource or the ImageService/Get gRPC API call.

Getting information about a public imageGetting information about a public image

Management console
CLI
Terraform
API
  1. In the management console, go to the folder you want to create a virtual machine in.
  2. Select Compute Cloud.
  3. At the top right, click Create resource.
  4. Select Virtual machine instance from the list that opens.
  5. Under Boot disk image, click next to the public image you need.
  6. The window that opens will show details of the public image.
  7. To view all available public images, go to the Marketplace tab and click Show all Marketplace products.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. See the description of the CLI command for getting information about a public image:

    yc compute image get --help
    
  2. Get information about a public image by specifying its ID:

    yc compute image get <image_ID>
    

    To learn the image ID, get a list of images in the folder.

    Result:

    id: fd89ls0nj4oqmlhhi568
    folder_id: standard-images
    created_at: "2024-04-29T10:58:27Z"
    name: ubuntu-2204-lts-oslogin-v20240429
    description: Ubuntu 22.04 OsLogin
    family: ubuntu-2204-lts-oslogin
    storage_size: "7511998464"
    min_disk_size: "10737418240"
    product_ids:
      - f2e48vn7nr04r2bpg4eg
    status: READY
    os:
      type: LINUX
    pooled: true
    

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 documentation on the Terraform website or mirror website.

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

To get information about a public image using Terraform:

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

    data "yandex_compute_image" "my_image" {
      image_id = "<image_ID>"
    }
    output "image" {
      value = data.yandex_compute_image.my_image.family
    }
    

    Where:

    • data "yandex_compute_image": Description of the public image as a data source:
      • image_id: Public image ID. To learn the image ID, get a list of images in the folder.
    • output "image": Output variable storing information about the OS family:
      • value: Returned value.

    You can replace family with any other parameter to get the information you need. For more information about the yandex_compute_image data source parameters, see the relevant provider documentation.

  2. Create the resources:

    1. In the terminal, change to the folder where you edited the configuration file.

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

      terraform validate
      

      If the configuration is correct, the following message is returned:

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

      terraform plan
      

      The terminal will display a list of resources with parameters. No changes are made at this step. If the configuration contains errors, Terraform will point them out.

    4. Apply the configuration changes:

      terraform apply
      
    5. Confirm the changes: type yes in the terminal and press Enter.

    Terraform will create all the required resources and display the output variable values in the terminal. To check the results, run this command:

    terraform output
    

    Result:

    image = "ubuntu-2204-lts"
    

To get detailed information about a public image of a disk, use the get REST API method for the Image resource or the ImageService/Get gRPC API call.

You can also view information about all available public images in Cloud Marketplace.

Was the article helpful?

Previous
Getting a list of public images
Next
Getting information about a VM
Yandex project
© 2025 Yandex.Cloud LLC