Skip to content
Odinex Cloud
Terraform providerReferenceResources

odinex_snapshot

Creates a snapshot image of a server's disk. Use the snapshot ID as image of an odinex_server.

Creates a snapshot image of a server's disk. Use the snapshot ID as image of an odinex_server.

Example Usage

resource "odinex_snapshot" "golden" {
  server_id   = odinex_server.web.id
  description = "golden image"
  labels      = { image = "golden" }
}

Schema

Required

  • server_id (Number) ID of the server to snapshot. Changing it creates a new snapshot.

Optional

  • description (String) Description of the snapshot.
  • labels (Map of String) User-defined labels (key/value pairs). Up to 64 pairs; keys and values up to 63 characters.
  • timeouts (Block, Optional)

Read-Only

  • id (String) Unique ID of the resource.
  • image_size (Number) Size of the snapshot in GB.

Nested Schema for timeouts

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

terraform import odinex_snapshot.golden 120

On this page