Skip to content

Latest commit

 

History

History
79 lines (57 loc) · 2.16 KB

File metadata and controls

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

twc_software (Data Source)

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

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

data "twc_presets" "example-preset" {
  price_filter {
    from = 300
    to = 400
  }
}

# Select software with name = "Docker" and compatible OS with name = "ubuntu" and version = "22.04"
data "twc_software" "example-software" {
  name = "Docker"

  os {
    name = "ubuntu"
    version = "22.04"
  }
}

# Usage example of selected software
resource "twc_server" "example-server" {
  name = "Example server"
  os_id = data.twc_software.example-software.os[0].id
  software_id = data.twc_software.example-software.id

  preset_id = data.twc_presets.example-preset.id
}

Schema

Optional

Read-Only

  • id (String) The ID of this resource.

Nested Schema for os

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 (Number) Identifier of specified OS
  • requirements (List of Object) Configuration requirements to install specified OS (see below for nested schema)
  • version_codename (String) Codename of specified OS

Nested Schema for os.requirements

Read-Only:

  • bandwidth_min (Number)
  • cpu_min (Number)
  • disk_min (Number)
  • ram_min (Number)