Skip to content

Latest commit

 

History

History
70 lines (54 loc) · 2.62 KB

File metadata and controls

70 lines (54 loc) · 2.62 KB
page_title subcategory description
twc_configurator Data Source - Timeweb Cloud
Configurator data source that provides information about available hardware parameters with their restrictions with filtering and selection suitable one. All parameters are filters, so you can use only needed. Available configurators may be retrieved from API https://api.timeweb.cloud/api/v1/configurator/servers

twc_configurator (Data Source)

Configurator data source that provides information about available hardware parameters with their restrictions with filtering and selection suitable one. All parameters are filters, so you can use only needed. Available configurators may be retrieved from API

Примеры использования

data "twc_os" "example-os" {
  name = "ubuntu"
  version = "22.04"
}

# Select any configurator with location = "ru-1"
data "twc_configurator" "example-configurator" {
  location = "ru-1"
}

# Usage example of selected configuration
resource "twc_server" "example-server" {
  name = "Example server"
  os_id = data.twc_os.example-os.id

  configuration {
    configurator_id = data.twc_configurator.example-configurator.id
    disk = 1024 * 10
    cpu = 1
    ram = 1024
  }
}

Schema

Optional

  • cpu_frequency (String) CPU frequency for the created server (3.3)
  • disk_type (String) Disk type for the created server (ssd, nvme, hdd)
  • location (String) Location for the created server (ru-1, ru-2, pl-1, kz-1). When server was created all new presets or configuration may be only chosen from same location

Read-Only

  • id (String) The ID of this resource.
  • requirements (Block List) Configuration limitations for specified configurator (see below for nested schema)

Nested Schema for requirements

Read-Only:

  • cpu_max (Number) Maximum allowed CPU count
  • cpu_min (Number) Minimum allowed CPU count
  • cpu_step (Number) Step between allowed CPU counts
  • disk_max (Number) Maximum allowed disk size
  • disk_min (Number) Minimum allowed disk size
  • disk_step (Number) Step between allowed disk sizes
  • network_bandwidth_max (Number) Maximum allowed network bandwidth capacity
  • network_bandwidth_min (Number) Minimum allowed network bandwidth capacity
  • network_bandwidth_step (Number) Step between allowed network bandwidth capacities
  • ram_max (Number) Maximum allowed RAM size
  • ram_min (Number) Minimum allowed RAM size
  • ram_step (Number) Step between allowed RAM sizes