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
          • loadtesting_agent

In this article:

  • Example usage
  • Schema
  • Required
  • Optional
  • Read-Only
  • Nested Schema for compute_instance
  • Nested Schema for compute_instance.boot_disk
  • Nested Schema for compute_instance.boot_disk.initialize_params
  • Nested Schema for compute_instance.network_interface
  • Nested Schema for compute_instance.resources
  • Nested Schema for log_settings
  • Nested Schema for timeouts
  • Import
  1. Terraform reference
  2. Resources
  3. Load Testing
  4. Resources
  5. loadtesting_agent

yandex_loadtesting_agent (Resource)

Written by
Yandex Cloud
Updated at August 7, 2025
  • Example usage
  • Schema
    • Required
    • Optional
    • Read-Only
    • Nested Schema for compute_instance
    • Nested Schema for compute_instance.boot_disk
    • Nested Schema for compute_instance.boot_disk.initialize_params
    • Nested Schema for compute_instance.network_interface
    • Nested Schema for compute_instance.resources
    • Nested Schema for log_settings
    • Nested Schema for timeouts
  • Import

A Load Testing Agent resource. For more information, see the official documentation.

Example usageExample usage

//
// Create a new LoadTesting Agent.
//
resource "yandex_loadtesting_agent" "my-agent" {
  name        = "my-agent"
  description = "2 core 4 GB RAM agent"
  folder_id   = data.yandex_resourcemanager_folder.test_folder.id
  labels = {
    jmeter = "5"
  }

  compute_instance {
    zone_id            = "ru-central1-b"
    service_account_id = yandex_iam_service_account.test_account.id
    resources {
      memory = 4
      cores  = 2
    }
    boot_disk {
      initialize_params {
        size = 15
      }
      auto_delete = true
    }
    network_interface {
      subnet_id = yandex_vpc_subnet.my-subnet-a.id
    }
  }
}

SchemaSchema

RequiredRequired

  • compute_instance (Block List, Min: 1, Max: 1) The template for creating new compute instance running load testing agent. (see below for nested schema)
  • name (String) The resource name.

OptionalOptional

  • description (String) The resource description.
  • folder_id (String) The folder identifier that resource belongs to. If it is not provided, the default provider folder-id is used.
  • labels (Map of String) A set of key/value label pairs which assigned to resource.
  • log_settings (Block List, Max: 1) The logging settings of the load testing agent. (see below for nested schema)
  • timeouts (Block, Optional) (see below for nested schema)

Read-OnlyRead-Only

  • compute_instance_id (String) Compute Instance ID.
  • id (String) The ID of this resource.

Nested Schema for Nested Schema for compute_instance

Required:

  • boot_disk (Block List, Min: 1, Max: 1) Boot disk specifications for the instance. (see below for nested schema)
  • network_interface (Block List, Min: 1) Network specifications for the instance. This can be used multiple times for adding multiple interfaces. (see below for nested schema)
  • resources (Block List, Min: 1, Max: 1) Compute resource specifications for the instance. (see below for nested schema)
  • service_account_id (String) The ID of the service account authorized for this load testing agent. Service account should have loadtesting.generatorClient or loadtesting.externalAgent role in the folder.

Optional:

  • labels (Map of String) A set of key/value label pairs to assign to the instance.
  • metadata (Map of String) A set of metadata key/value pairs to make available from within the instance.
  • platform_id (String) The Compute platform for virtual machine.
  • zone_id (String) The availability zone where resource is located. If it is not provided, the default provider zone will be used.

Read-Only:

  • computed_labels (Map of String) The set of labels key:value pairs assigned to this instance. This includes user custom labels and predefined items created by Yandex Cloud Load Testing.
  • computed_metadata (Map of String) The set of metadata key:value pairs assigned to this instance. This includes user custom metadata, and predefined items created by Yandex Cloud Load Testing.

Nested Schema for Nested Schema for compute_instance.boot_disk

Required:

  • initialize_params (Block List, Min: 1, Max: 1) Parameters for creating a disk alongside the instance. (see below for nested schema)

Optional:

  • auto_delete (Boolean) Whether the disk is auto-deleted when the instance is deleted. The default value is true.
  • device_name (String) This value can be used to reference the device under /dev/disk/by-id/.

Read-Only:

  • disk_id (String) The ID of created disk.

Nested Schema for Nested Schema for compute_instance.boot_disk.initialize_params

Optional:

  • block_size (Number) Block size of the disk, specified in bytes.
  • description (String) A description of the boot disk.
  • name (String) A name of the boot disk.
  • size (Number) The size of the disk in GB. Defaults to 15 GB.
  • type (String) The disk type.

Nested Schema for Nested Schema for compute_instance.network_interface

Required:

  • subnet_id (String) The ID of the subnet to attach this interface to. The subnet must reside in the same zone where this instance was created.

Optional:

  • ip_address (String) Manual set static IP address.
  • ipv4 (Boolean) Flag for allocating IPv4 address for the network interface.
  • ipv6 (Boolean) Flag for allocating IPv6 address for the network interface.
  • ipv6_address (String) Manual set static IPv6 address.
  • nat (Boolean) Flag for using NAT.
  • nat_ip_address (String) A public address that can be used to access the internet over NAT.
  • security_group_ids (Set of String) Security group ids for network interface.

Read-Only:

  • index (Number)
  • mac_address (String)
  • nat_ip_version (String)

Nested Schema for Nested Schema for compute_instance.resources

Optional:

  • core_fraction (Number) If provided, specifies baseline core performance as a percent.
  • cores (Number) The number of CPU cores for the instance. Defaults to 2 cores.
  • memory (Number) The memory size in GB. Defaults to 2 GB.

Nested Schema for Nested Schema for log_settings

Optional:

  • log_group_id (String) The ID of cloud logging group to which the load testing agent sends logs.

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).
  • 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 resource ID. For getting the resource ID you can use Yandex Cloud Web Console or YC CLI.

# terraform import yandex_loadtesting_agent.<resource Name> <resource Id>
terraform import yandex_loadtesting_agent.my-agent ...

Was the article helpful?

Previous
loadtesting_agent
Next
lockbox_secret
© 2025 Direct Cursus Technology L.L.C.