Manage Linode Images with linode_image
devThe linode_image resource allows you to create, modify, and delete Linode Images. These images are snapshots of a Linode Instance Disk that can be used to provision new Linode Instances across different regions.
Common Use Cases
- Creating an image from an existing Linode Instance: Requires providing the
disk_idandlinode_idof the source instance. - Uploading an image from a local file: Requires a
file_pathand aregion. This feature is currently in beta and requires theLINODE_API_VERSIONenvironment variable to be set tov4beta. - Replicating images: You can specify
replica_regionsto distribute the image across multiple core regions. Note that providing a new list of regions will remove the image from any existing regions not included in the list.
resource "linode_image" "bar" {
label = "foo-sda-image"
description = "Image taken from foo"
disk_id = linode_instance.foo.disk.0.id
linode_id = linode_instance.foo.id
tags = ["image-tag", "test"]
}