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"}Arguments
Section titled “Arguments”| Name | Required | Notes |
|---|---|---|
name | yes | Forces replacement |
public_key | no | Import an existing public key. Forces replacement |
type | no | Used when generating (for example ed25519). Computed after create |
Attributes
Section titled “Attributes”| Name | Notes |
|---|---|
id | Platform id |
fingerprint | Key fingerprint from the API |
private_key | Sensitive. Set only when the platform generated the pair |
Import
Section titled “Import”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.