Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.22 KB

File metadata and controls

55 lines (40 loc) · 1.22 KB
page_title subcategory description
twc_ssh_keys Data Source - Timeweb Cloud
Data source that provides capability for filtering and SSH key selection. All parameters are filters, so you can use only needed

twc_ssh_keys (Data Source)

Data source that provides capability for filtering and SSH key selection. All parameters are filters, so you can use only needed

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

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

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

# Select SSH key with name = "Example"
data "twc_ssh_keys" "example-key" {
  name = "Example"
}

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

  preset_id = data.twc_presets.example-preset.id

  ssh_keys_ids = [data.twc_ssh_keys.example-key.id]
}

Schema

Required

  • name (String) Name of specified SSH Key

Read-Only

  • body (String) Public part of specified SSH Key
  • created_at (String) Time of creation specified SSH Key in ISO8601 format
  • id (String) The ID of this resource.