rso_ssh_key (Resource)¶
An SSH public key in the tenant's key store, to install on instances with rso_instance.ssh_key_ids. Private keys are refused. Deleting the key does not remove it from instances that already have it.
Example Usage¶
resource "rso_ssh_key" "laptop" {
name = "work laptop"
public_key = file("~/.ssh/id_ed25519.pub")
}
# Only the account that added it can install a personal key.
resource "rso_ssh_key" "ci" {
name = "ci"
public_key = var.ci_public_key
scope = "personal"
}
Schema¶
Required¶
name(String) Name of the key, unique among the tenant's keys of the same scope. Can be changed in place.public_key(String) One public key line, for examplefile("~/.ssh/id_ed25519.pub"). Changing it creates a new key.
Optional¶
scope(String)tenant(default): every member can install it; adding it needs thesshKeys.managepermission.personal: only the account that added it. Changing it creates a new key.
Read-Only¶
fingerprint(String) SHA256 fingerprint, asssh-keygen -lprints it.id(String) The ID of this resource.key_type(String) For examplessh-ed25519.
Import¶
Import is supported using the following syntax:
# Import a stored key by its id (shown by the API and in the console URL).
terraform import rso_ssh_key.laptop 6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b