layout | page_title | sidebar_current | description |
---|---|---|---|
cloudstack |
Cloudstack: cloudstack_template |
docs-cloudstack-datasource-template |
Gets information about Cloudstack template. |
Use this datasource to get the ID of a template for use in other resources.
data "cloudstack_template" "my_template" {
template_filter = "featured"
filter {
name = "name"
value = "CentOS 7\\.1"
}
filter {
name = "hypervisor"
value = "KVM"
}
}
-
template_filter
- (Required) The template filter. Possible values arefeatured
,self
,selfexecutable
,sharedexecutable
,executable
andcommunity
(see the Cloudstack API listTemplate command documentation). -
filter
- (Required) One or more name/value pairs to filter off of. You can apply filters on any exported attributes.
The following attributes are exported:
id
- The template ID.account
- The account name to which the template belongs.created
- The date this template was created.display_text
- The template display text.format
- The format of the template.hypervisor
- The hypervisor on which the templates runs.name
- The template name.size
- The size of the template.