scalr_ssh_key

Resource: scalr_ssh_key

A resource to manage Scalr SSH keys with options for sharing and environment linkage.

Example Usage

resource "scalr_ssh_key" "example" {
  name        = "example-ssh-key"
  private_key = <<EOF
-----BEGIN OPENSSH PRIVATE KEY-----
YOUR_PRIVATE_KEY_CONTENT_HERE
-----END OPENSSH PRIVATE KEY-----
EOF

  account_id   = "acc-xxxxxxxxxx"
  environments = ["env-xxxxxxxxxx"]
}

Schema

Required

  • name (String) The name of the SSH key. Must be unique within an account.
  • private_key (String, Sensitive) The private key for the SSH key.

Optional

  • account_id (String) The account ID to which the SSH key belongs.
  • environments (Set of String) The environments where the SSH key can be used. Use ["*"] to share with all environments.

Read-Only

  • id (String) The ID of this resource.

Import

Import is supported using the following syntax:

terraform import scalr_ssh_key.<resource_name> <ssh_key_id>