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.
Terraform in Yandex Cloud
  • Getting started
  • Solution library
    • Overview
    • Release notes
          • cloud_desktops_desktop
          • cloud_desktops_desktop_group

In this article:

  • Example usage
  • Schema
  • Required
  • Optional
  • Read-Only
  • Nested Schema for members
  • Nested Schema for network_interface
  • Nested Schema for timeouts
  • Import
  1. Terraform reference
  2. Resources
  3. Cloud Desktops
  4. Resources
  5. cloud_desktops_desktop

yandex_cloud_desktops_desktop (Resource)

Written by
Yandex Cloud
Updated at November 25, 2025
  • Example usage
  • Schema
    • Required
    • Optional
    • Read-Only
    • Nested Schema for members
    • Nested Schema for network_interface
    • Nested Schema for timeouts
  • Import

Manages a Cloud Desktops Desktop. For more information see the official documentation

Example usageExample usage

// network to function
resource "yandex_vpc_network" "network" {}

resource "yandex_vpc_subnet" "subnet" {
	zone 			= "ru-central1-a"
	network_id 		= yandex_vpc_network.network.id
	v4_cidr_blocks 	= ["10.1.0.0/24"]
}

data "yandex_cloud_desktops_image" "desktop_image_by_folder_and_name" {
	name 	  = "Ubuntu 20.04 LTS (2024-12-03)"
}

// desktop group
resource "yandex_cloud_desktops_desktop_group" "desktop_group" {
	name 		= "desktop-group-name"
	folder_id 	= "<your folder id (optional)>"
	image_id 	= data.yandex_cloud_desktops_image.image.id
	description = "Sample description"
	
	desktop_template = {
		resources = {
			cores 			= 4
			memory 			= 8
			core_fraction 	= 100
		}
		boot_disk = {
			initialize_params = {
				size = 24
				type = "SSD"
			}
		}
		data_disk = {
			initialize_params = {
				size = 16
				type = "HDD"
			}
		}
		network_interface = {
			network_id = yandex_vpc_network.network.id
			subnet_ids = ["${yandex_vpc_subnet.subnet.id}"]
		}
		group_config = {
			initialize_params = {
				min_ready_desktops 	= 1
				max_desktops_amount = 5
				desktop_type 		= "PERSISTENT"
				members				= [
					{
						id 		= "<your id>"
						type 	= "userAccount"
					}
				]
			}
		}
	}
		
	labels = {
    	label1 = "label1-value"
    	label2 = "label2-value"
  	}
}

// desktop
resource "yandex_cloud_desktops_desktop" "desktop" {
	name 				= "desktop-name"
	desktop_group_id 	= yandex_cloud_desktops_desktop_group.desktop_group.desktop_group_id
	
	network_interface = {
		subnet_id = yandex_vpc_subnet.subnet.id
	}

	members = [
		{
			subject_id 		= "bfblmuiaug62t0cki3dq"
			subject_type 	= "userAccount"
		},
	]

	labels = {
		label1 = "label1-value"
		label2 = "label2-value"
	}
}

SchemaSchema

RequiredRequired

  • desktop_group_id (String) The id of the Desktop Group to which the Desktop belongs

OptionalOptional

  • labels (Map of String) A set of key/value label pairs which assigned to resource.
  • members (Attributes List) The list of members which can use the Desktop (see below for nested schema)
  • name (String) The name of the Desktop
  • network_interface (Attributes) The specification of the Desktop network interface (see below for nested schema)
  • timeouts (Block, Optional) (see below for nested schema)

Read-OnlyRead-Only

  • desktop_id (String) The id of the Desktop
  • id (String) Import ID

Nested Schema for Nested Schema for members

Required:

  • subject_id (String) Identity of the access binding. See the official documentation
  • subject_type (String) Type of the access binding. See the official documentation

Nested Schema for Nested Schema for network_interface

Optional:

  • subnet_id (String) ID of the subnet for desktop

Nested Schema for Nested Schema for timeouts

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
  • delete (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
  • update (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

ImportImport

The resource can be imported by using their desktopID and subnetID. For getting the resource ID you can use Yandex Cloud Web Console or YC CLI.

# terraform import yandex_cloud_desktops_desktop.<resource Name> "desktopID,subnetID"
terraform import yandex_cloud_desktops_desktop.my_desktop "fd8go**********trjsd,fd8go**********trjsd"

Was the article helpful?

Previous
cloud_desktops_image
Next
cloud_desktops_desktop_group
© 2025 Direct Cursus Technology L.L.C.