Skip to content

Latest commit

 

History

History
64 lines (48 loc) · 1.88 KB

File metadata and controls

64 lines (48 loc) · 1.88 KB
page_title subcategory description
twc_os Data Source - Timeweb Cloud
Data source that provides bunch of useful parameters for filtering and suitable OS selection. All parameters are filters, so you can use only needed. Available OS may be retrieved from API https://api.timeweb.cloud/api/v1/os/servers

twc_os (Data Source)

Data source that provides bunch of useful parameters for filtering and suitable OS selection. All parameters are filters, so you can use only needed. Available OS may be retrieved from API

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

data "twc_configurator" "example-configurator" {
  location = "ru-1"
}

# Select OS with name = "ubuntu" and version = "22.04"
data "twc_os" "example-os" {
  name = "ubuntu"
  version = "22.04"
}

# Usage example of selected OS
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

  • family (String) Family of specified OS
  • name (String) Name of specified OS
  • version (String) Version of specified OS

Read-Only

  • description (String) Description of specified OS
  • id (String) The ID of this resource.
  • requirements (Block List) Configuration requirements to install specified OS (see below for nested schema)
  • version_codename (String) Codename of specified OS

Nested Schema for requirements

Read-Only:

  • bandwidth_min (Number) Minimal allowed network bandwidth capacity
  • cpu_min (Number) Minimal allowed CPU count
  • disk_min (Number) Minimal allowed disk size
  • ram_min (Number) Minimal allowed RAM size