Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.4 KB

File metadata and controls

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

twc_image (Data Source)

Data source that provides bunch of useful parameters for filtering and suitable image 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 image with name = "ubuntu" and version = "22.04"
data "twc_image" "example-image" {
  name = "TimewebCloud_Daring Jackdaw_15.08.2023"
}

# Usage example of selected OS
resource "twc_server" "example-server" {
  name = "Example server"
  image_id = data.twc_image.example-image.id

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

Schema

Optional

  • id (String) Image ID
  • is_custom (Boolean) That image is custom
  • location (String) Location where image was created
  • name (String) Name of specified image
  • os (String) OS of specified image