» gridscale_template

Get data of a template with a specific name. This can be used to make it more visible which template is being used for new storages.

An error is triggered if the template name does not exist.

» Example Usage

Get the template:

   data "gridscale_template" "ubuntu" {
     name = "Ubuntu 18.04 LTS"
   }

Using the template datasource for the creation of a storage:

resource "gridscale_storage" "storage-test"{
    name = "terra-storage-test"
    capacity = 10
    template {
        sshkeys = [ "e17e8fd2-0797-4a00-a85d-eb9a612a6e4e" ]
        template_uuid = data.gridscale_template.ubuntu.id
    }
}

» Argument Reference

The following arguments are supported:

» Attributes Reference

The following attributes are exported:

  • name - The name of the template.
  • id - The UUID of the template.
  • location_uuid - Helps to identify which datacenter an object belongs to.
  • location_country - Formatted by the 2 digit country code (ISO 3166-2) of the host country.
  • location_iata - Uses IATA airport code, which works as a location identifier.
  • location_name - The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters.
  • status - Status indicates the status of the object.
  • ostype - The operating system installed in the template.
  • version - The version of the template.
  • private - The object is private, the value will be true. Otherwise the value will be false.
  • license_product_no - If a template has been used that requires a license key (e.g. Windows Servers) this shows the product_no of the license (see the /prices endpoint for more details).
  • create_time - The date and time the object was initially created.
  • change_time - The date and time of the last object change.
  • distro - The OS distrobution that the Template contains.
  • description - Description of the Template.
  • usage_in_minutes - Total minutes the object has been running.
  • capacity - The capacity of a storage/ISO Image/template/snapshot in GB.
  • current_price - Defines the price for the current period since the last bill.
  • labels - List of labels.