Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

SSH key

platform_ssh_key is an SSH key pair. Provide public_key to import an existing key, or omit it to have the platform generate one. Generated private_key is set once, at create, and is sensitive.

name and public_key force replacement. There is no in-place update.

resource "platform_ssh_key" "laptop" {
name = "laptop"
public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGtZTyVNvmNhfSbA5lnVWobd+oJMyCjPxJS21uG+x5Qb comment"
}

Generate a key instead of importing:

resource "platform_ssh_key" "ci" {
name = "ci"
type = "ed25519"
}
NameRequiredNotes
nameyesForces replacement
public_keynoImport an existing public key. Forces replacement
typenoUsed when generating (for example ed25519). Computed after create
NameNotes
idPlatform id
fingerprintKey fingerprint from the API
private_keySensitive. Set only when the platform generated the pair
Terminal window
terraform import platform_ssh_key.laptop key_…

private_key stays absent after import. The platform returns generated private material once, at creation, and never again.