arvancloud_iaas_ssh_keys (Data Source)
Lists IaaS SSH keys, optionally filtered by region or availability zone.
Example Usage
# List all SSH keys from all availability zones.
data "arvancloud_iaas_ssh_keys" "all" {}
output "all_ssh_keys" {
value = data.arvancloud_iaas_ssh_keys.all.ssh_keys
}
# List SSH keys in a specific region.
data "arvancloud_iaas_ssh_keys" "ir_central" {
region = "ir-central1"
}
output "ir_central_ssh_keys" {
value = data.arvancloud_iaas_ssh_keys.ir_central.ssh_keys
}
# List SSH keys in a specific availability zone.
data "arvancloud_iaas_ssh_keys" "bamdad_az" {
availability_zone = "ir-central1-a"
}
output "bamdad_ssh_key_names" {
value = [for k in data.arvancloud_iaas_ssh_keys.bamdad_az.ssh_keys : k.name]
}
Schema
Optional
availability_zone(String) Filter SSH keys by availability zone code name (e.g.ir-central1-a). Cannot be combined withregion.region(String) Filter SSH keys by region code name (e.g.ir-central1). Cannot be combined withavailability_zone.
Read-Only
id(String) Unique identifier for this data source.ssh_keys(Attributes List) List of SSH keys matching the specified filters. (see below for nested schema)
Nested Schema for ssh_keys
Read-Only:
availability_zone(String) Availability zone where the SSH key is stored (e.g.ir-central1-a).created_at(String) Timestamp when the SSH key was created.fingerprint(String) MD5 fingerprint of the SSH key.id(String) Unique identifier of the SSH key.name(String) Name of the SSH key.public_key(String) Public key material.region(String) Region where the SSH key is stored (e.g.ir-central1).