» Data Source: hcloud_image
Provides details about a Hetzner Cloud Image. This resource is useful if you want to use a non-terraform managed image.
» Example Usage
data "hcloud_image" "image_1" {
id = "1234"
}
data "hcloud_image" "image_2" {
name = "ubuntu-18.04"
}
data "hcloud_image" "image_3" {
with_selector = "key=value"
}
resource "hcloud_server" "main" {
image = "${data.hcloud_image.image_1.name}"
}
» Argument Reference
-
id
- (Optional, string) ID of the Image. -
name
- (Optional, string) Name of the Image. -
with_selector
- (Optional, string) Label selector -
most_recent
- (Optional, bool) If more than one result is returned, use the most recent Image. -
with_status
- (Optional, list) List only images with the specified status, could containcreating
oravailable
.
» Attributes Reference
-
id
- (int) Unique ID of the Image. -
name
- (string) Name of the Image. -
type
- (string) Type of the Image, could besystem
,backup
orsnapshot
. -
status
- (string) Status of the Image. -
description
- (string) Description of the Image. -
created
- (string) Date when the Image was created (in ISO-8601 format). -
os_flavor
- (string) Flavor of operating system contained in the image, could beubuntu
,centos
,debian
,fedora
orunknown
. -
os_version
- (string) Operating system version. -
rapid_deploy
- (bool) Indicates that rapid deploy of the image is available. -
deprecated
- (string) Point in time when the image is considered to be deprecated (in ISO-8601 format).