پرش به مطلب اصلی

arvancloud_iaas_ssh_key (Resource)

Manages an IaaS SSH key in a specific availability zone.

Example Usage

# Create an SSH key in a specific availability zone.
resource "arvancloud_iaas_ssh_key" "example" {
name = "my-deploy-key"
public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExamplePublicKeyMaterial user@host"
availability_zone = "ir-central1-a"
}

output "ssh_key_fingerprint" {
description = "MD5 fingerprint of the created SSH key."
value = arvancloud_iaas_ssh_key.example.fingerprint
}

output "ssh_key_id" {
description = "API-assigned identifier of the SSH key."
value = arvancloud_iaas_ssh_key.example.id
}

Schema

Required

  • availability_zone (String) Availability zone where the SSH key will be created (e.g. ir-central1-a).
  • name (String) Name of the SSH key. Must be unique within the availability zone.
  • public_key (String) The public key material (OpenSSH format).

Read-Only

  • 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 assigned by the API.
  • region (String) Region where the SSH key is stored (e.g. ir-central1).

Import

Import is supported using the following syntax:

terraform import arvancloud_iaas_ssh_key.example ir-central1-a:my-key