2015-04-12 10:52:29 +02:00
|
|
|
---
|
|
|
|
layout: "cloudstack"
|
|
|
|
page_title: "CloudStack: cloudstack_template"
|
|
|
|
sidebar_current: "docs-cloudstack-resource-template"
|
|
|
|
description: |-
|
|
|
|
Registers an existing template into the CloudStack cloud.
|
|
|
|
---
|
|
|
|
|
2017-04-10 18:15:08 +02:00
|
|
|
# cloudstack_template
|
2015-04-12 10:52:29 +02:00
|
|
|
|
|
|
|
Registers an existing template into the CloudStack cloud.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
2017-04-10 18:15:08 +02:00
|
|
|
```hcl
|
2015-04-12 10:52:29 +02:00
|
|
|
resource "cloudstack_template" "centos64" {
|
2017-02-18 23:48:50 +01:00
|
|
|
name = "CentOS 6.4 x64"
|
|
|
|
format = "VHD"
|
2015-04-12 10:52:29 +02:00
|
|
|
hypervisor = "XenServer"
|
2017-02-18 23:48:50 +01:00
|
|
|
os_type = "CentOS 6.4 (64bit)"
|
|
|
|
url = "http://someurl.com/template.vhd"
|
|
|
|
zone = "zone-1"
|
2015-04-12 10:52:29 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `name` - (Required) The name of the template.
|
|
|
|
|
|
|
|
* `display_text` - (Optional) The display name of the template.
|
|
|
|
|
2016-04-11 17:14:19 +02:00
|
|
|
* `format` - (Required) The format of the template. Valid values are `QCOW2`,
|
|
|
|
`RAW`, and `VHD`.
|
2015-04-12 10:52:29 +02:00
|
|
|
|
|
|
|
* `hypervisor` - (Required) The target hypervisor for the template. Changing
|
|
|
|
this forces a new resource to be created.
|
|
|
|
|
|
|
|
* `os_type` - (Required) The OS Type that best represents the OS of this
|
|
|
|
template.
|
|
|
|
|
|
|
|
* `url` - (Required) The URL of where the template is hosted. Changing this
|
|
|
|
forces a new resource to be created.
|
|
|
|
|
2016-04-11 17:14:19 +02:00
|
|
|
* `project` - (Optional) The name or ID of the project to create this template for.
|
|
|
|
Changing this forces a new resource to be created.
|
|
|
|
|
2015-04-29 11:21:37 +02:00
|
|
|
* `zone` - (Required) The name or ID of the zone where this template will be created.
|
2015-04-12 10:52:29 +02:00
|
|
|
Changing this forces a new resource to be created.
|
|
|
|
|
|
|
|
* `is_dynamically_scalable` - (Optional) Set to indicate if the template contains
|
2016-04-11 17:14:19 +02:00
|
|
|
tools to support dynamic scaling of VM cpu/memory (defaults false)
|
2015-04-12 10:52:29 +02:00
|
|
|
|
|
|
|
* `is_extractable` - (Optional) Set to indicate if the template is extractable
|
|
|
|
(defaults false)
|
|
|
|
|
|
|
|
* `is_featured` - (Optional) Set to indicate if the template is featured
|
|
|
|
(defaults false)
|
|
|
|
|
|
|
|
* `is_public` - (Optional) Set to indicate if the template is available for
|
|
|
|
all accounts (defaults true)
|
|
|
|
|
|
|
|
* `password_enabled` - (Optional) Set to indicate if the template should be
|
|
|
|
password enabled (defaults false)
|
|
|
|
|
|
|
|
* `is_ready_timeout` - (Optional) The maximum time in seconds to wait until the
|
|
|
|
template is ready for use (defaults 300 seconds)
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The template ID.
|
|
|
|
* `display_text` - The display text of the template.
|
|
|
|
* `is_dynamically_scalable` - Set to "true" if the template is dynamically scalable.
|
|
|
|
* `is_extractable` - Set to "true" if the template is extractable.
|
|
|
|
* `is_featured` - Set to "true" if the template is featured.
|
|
|
|
* `is_public` - Set to "true" if the template is public.
|
|
|
|
* `password_enabled` - Set to "true" if the template is password enabled.
|
|
|
|
* `is_ready` - Set to "true" once the template is ready for use.
|