Skip to content

Latest commit

 

History

History
261 lines (173 loc) · 7.01 KB

File metadata and controls

261 lines (173 loc) · 7.01 KB
page_title subcategory description
anxcloud_template Data Source - terraform-provider-anxcloud
Provides available templates for specified location. This information can be used to provision virtual servers using the anxcloud_virtual_server resource.

anxcloud_template (Data Source)

Provides available templates for specified location. This information can be used to provision virtual servers using the anxcloud_virtual_server resource.

Example Usage

data "anxcloud_core_location" "anx04" {
  code = "ANX04"
}

data "anxcloud_template" "anx04" {
  location_id = data.anxcloud_core_location.anx04.id
}

// To get a specific OS, filter the `anxcloud_template` data-source:
locals {
  debian_11_templates = values({
    for i, template in data.anxcloud_template.anx04.templates : tostring(i) => template
    if substr(template.name, 0, 9) == "Debian 11"
  })
}
// now you can use local.debian_11_templates[0].id

Schema

Required

  • location_id (String) Location identifier.

Optional

  • template_type (String) Template type. Defaults to 'templates' and also supports 'from_scratch'.

Read-Only

  • id (String) The ID of this resource.
  • templates (List of Object) List of available templates. (see below for nested schema)

Nested Schema for templates

Read-Only:

Nested Schema for templates.params

Read-Only:

Nested Schema for templates.params.boot_delay_seconds

Read-Only:

  • default_value (Number)
  • label (String)
  • max_value (Number)
  • min_value (Number)
  • required (Boolean)

Nested Schema for templates.params.cpus

Read-Only:

  • default_value (Number)
  • label (String)
  • max_value (Number)
  • min_value (Number)
  • required (Boolean)

Nested Schema for templates.params.disk_gb

Read-Only:

  • default_value (Number)
  • label (String)
  • max_value (Number)
  • min_value (Number)
  • required (Boolean)

Nested Schema for templates.params.disk_type

Read-Only:

  • default_value (String)
  • label (String)
  • required (Boolean)

Nested Schema for templates.params.dns0

Read-Only:

  • default_value (String)
  • label (String)
  • required (Boolean)

Nested Schema for templates.params.dns1

Read-Only:

  • default_value (String)
  • label (String)
  • required (Boolean)

Nested Schema for templates.params.dns2

Read-Only:

  • default_value (String)
  • label (String)
  • required (Boolean)

Nested Schema for templates.params.dns3

Read-Only:

  • default_value (String)
  • label (String)
  • required (Boolean)

Nested Schema for templates.params.enter_bios_setup

Read-Only:

  • default_value (Boolean)
  • label (String)
  • required (Boolean)

Nested Schema for templates.params.hostname

Read-Only:

  • default_value (String)
  • label (String)
  • required (Boolean)

Nested Schema for templates.params.ips

Read-Only:

  • default_value (String)
  • label (String)
  • required (Boolean)

Nested Schema for templates.params.memory_mb

Read-Only:

  • default_value (Number)
  • label (String)
  • max_value (Number)
  • min_value (Number)
  • required (Boolean)

Nested Schema for templates.params.nics

Read-Only:

Nested Schema for templates.params.nics.required

Read-Only:

  • default (Boolean)
  • id (Number)
  • name (String)

Nested Schema for templates.params.password

Read-Only:

  • default_value (String)
  • label (String)
  • required (Boolean)

Nested Schema for templates.params.user

Read-Only:

  • default_value (String)
  • label (String)
  • required (Boolean)

Nested Schema for templates.params.vlan

Read-Only:

  • default_value (String)
  • label (String)
  • required (Boolean)