arvancloud_iaas_snapshot (Resource)
Manages an IaaS snapshot in a specific availability zone. Exactly one of server_id or volume_id must be specified.
Example Usage
# Snapshot of a server
resource "arvancloud_iaas_snapshot" "server_snap" {
name = "my-server-snapshot"
description = "Daily backup of production server"
availability_zone = "ir-central1-a"
server_id = "srv-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
# Snapshot of a volume
resource "arvancloud_iaas_snapshot" "volume_snap" {
name = "my-volume-snapshot"
availability_zone = "ir-central1-a"
volume_id = "vol-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
output "server_snapshot_id" {
value = arvancloud_iaas_snapshot.server_snap.id
}
output "server_snapshot_status" {
value = arvancloud_iaas_snapshot.server_snap.status
}
output "volume_snapshot_size_gib" {
value = arvancloud_iaas_snapshot.volume_snap.size
}
output "volume_snapshot_created_at" {
value = arvancloud_iaas_snapshot.volume_snap.created_at
}
Schema
Required
availability_zone(String) Availability zone where the snapshot will be created (e.g.ir-central1-a).name(String) Name of the snapshot.
Optional
description(String) Optional description for the snapshot.server_id(String) ID of the server to snapshot. Mutually exclusive withvolume_id.volume_id(String) ID of the volume to snapshot. Mutually exclusive withserver_id.
Read-Only
created_at(String) Timestamp when the snapshot was created.id(String) Unique identifier of the snapshot assigned by the API.image_id(String) ID of the image associated with the snapshot.real_size(Number) Actual disk usage of the snapshot in bytes.real_size_avail(Boolean) Whether the real size information is available.region(String) Region where the snapshot is stored (e.g.ir-central1).reverted_on(String) Timestamp when the snapshot was last reverted, if applicable.server_name(String) Name of the source server.size(Number) Size of the snapshot in GiB.status(String) Current status of the snapshot (e.g.available).type(String) Type of snapshot (e.g.server,volume).volume_name(String) Name of the source volume.
Import
Import is supported using the following syntax:
terraform import arvancloud_iaas_snapshot.example ir-central1-a:snap123