mirror of
https://github.com/oscarhermoso/terraform-provider-binarylane
synced 2026-10-19 13:48:08 +11:00
55 lines
1.3 KiB
Markdown
55 lines
1.3 KiB
Markdown
---
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
|
page_title: "binarylane_ssh_key Resource - terraform-provider-binarylane"
|
|
subcategory: ""
|
|
description: |-
|
|
|
|
---
|
|
|
|
# binarylane_ssh_key (Resource)
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
```terraform
|
|
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 generated by tfplugindocs -->
|
|
## 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:
|
|
|
|
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
|
|
|
```shell
|
|
terraform import binarylane_ssh_key.example "<SSH Key ID or fingerprint>"
|
|
```
|