Files
terraform-provider-binarylane/docs/resources/ssh_key.md
T
Oscar Hermoso 5767bb6739 🔑 Fix whitespace causing SSH key to be re-created (#86)
* 🔑 trim SSH key string with custom value
* 🔑 RequiresReplace plan modifier for TrimmedString
2025-07-18 13:55:07 +08:00

1.2 KiB

page_title, subcategory, description
page_title subcategory description
binarylane_ssh_key Resource - terraform-provider-binarylane

binarylane_ssh_key (Resource)

Example Usage

resource "binarylane_ssh_key" "example" {
  name = "tf-example"

  # Generate with: ssh-keygen -t ed25519 -C "name@example.com"
  public_key = file("~/.ssh/id_ed25519.pub")
}

resource "binarylane_server" "example" {
  # ...
  ssh_keys = [binarylane_ssh_key.example.id]
}

Schema

Required

  • name (String) A name to help you identify the key.
  • public_key (String) The public key in OpenSSH "authorized_keys" format. This should be a valid public key, such as one generated by ssh-keygen.

Optional

  • default (Boolean) If true, this SSH key will be included on all new server installations (if the operating system supports SSH key injection). Default is false.

Read-Only

  • fingerprint (String) The fingerprint of the SSH key.
  • id (Number) The numeric ID of the SSH key.

Import

Import is supported using the following syntax:

terraform import binarylane_ssh_key.example "<SSH Key ID or fingerprint>"