arvancloud_iaas_backup_slots (Data Source)
Lists all backup slots (snapshots) for a specific backup configuration. Includes both automatic and manual slots. Slots are sorted by creation time in descending order (newest first).
Example Usage
# List all backup slots for a specific volume
data "arvancloud_iaas_backup_slots" "example" {
backup_name = "my_srv_name"
availability_zone = "ir-central1-a"
}
output "backup_name" {
value = data.arvancloud_iaas_backup_slots.example.backup_name
}
output "slots_count" {
value = length(data.arvancloud_iaas_backup_slots.example.slots)
}
output "first_slot_name" {
value = length(data.arvancloud_iaas_backup_slots.example.slots) > 0 ? data.arvancloud_iaas_backup_slots.example.slots[0].slot_name : null
}
output "all_slot_ids" {
value = [for slot in data.arvancloud_iaas_backup_slots.example.slots : slot.backup_id]
}
Schema
Required
availability_zone(String) Availability zone where the backup resides (e.g.ir-central1-a).backup_name(String) Name of the backup configuration.
Read-Only
id(String) Unique identifier for this datasource query.server_id(String) ID of the server instance associated with this backup.server_name(String) Name of the server instance associated with this backup.slots(Attributes List) List of backup slots for this backup configuration, sorted by creation time (newest first). (see below for nested schema)
Nested Schema for slots
Read-Only:
backup_id(String) Unique identifier for this backup slot.created_at(Number) Unix timestamp when the backup slot was created.fail_reason(String) Reason for backup failure, if the status iserror. Empty if the backup is successful.provisioned_size(Number) Provisioned size of the backup in bytes.slot_name(String) Display name of the backup slot.status(String) Current status of the backup slot (e.g.available,creating,error).type(String) Type of backup slot (e.g.manual,automatic).used_size(Number) Actual used size of the backup in bytes.