exoscale_ssh_key (Resource)
Manage Exoscale SSH Keys.
Example Usage
resource "exoscale_ssh_key" "my_ssh_key" {
name = "my-ssh-key"
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGRY..."
}Should you want to create an SSH keypair (including private key) with Terraform, please use the tls_private_key resource:
resource "tls_private_key" "my_ssh_key" {
algorithm = "ED25519"
}
resource "exoscale_ssh_key" "my_ssh_key" {
name = "my-ssh-key"
public_key = tls_private_key.my_ssh_key.public_key_openssh
}Please refer to the examples directory for complete configuration examples.
Schema
Required
name(String) ❗ The SSH key name.public_key(String) ❗ The SSH public key that will be authorized in compute instances.
Optional
timeouts(Block, Optional) (see below for nested schema)
Read-Only
fingerprint(String) The SSH key unique identifier.id(String) The SSH key name.
Nested Schema for timeouts
Optional:
create(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).delete(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.read(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Read operations occur during any refresh or planning operation when refresh is enabled.update(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).
-> The symbol ❗ in an attribute indicates that modifying it, will force the creation of a new resource.
Import
An existing SSH key may be imported as a resource by <name>:
terraform import \
exoscale_ssh_key.my_ssh_key \
my-ssh-keyLast updated on