2022-08-25 20:39:36 -07:00
|
|
|
---
|
|
|
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
|
|
|
|
page_title: "boundary_credential_ssh_private_key Resource - terraform-provider-boundary"
|
|
|
|
|
subcategory: ""
|
|
|
|
|
description: |-
|
|
|
|
|
The SSH private key credential resource allows you to configure a credential using a username, private key and optional passphrase.
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# boundary_credential_ssh_private_key (Resource)
|
|
|
|
|
|
|
|
|
|
The SSH private key credential resource allows you to configure a credential using a username, private key and optional passphrase.
|
|
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
|
|
```terraform
|
|
|
|
|
resource "boundary_scope" "org" {
|
|
|
|
|
name = "organization_one"
|
|
|
|
|
description = "global scope"
|
|
|
|
|
scope_id = "global"
|
|
|
|
|
auto_create_admin_role = true
|
|
|
|
|
auto_create_default_role = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resource "boundary_scope" "project" {
|
|
|
|
|
name = "project_one"
|
|
|
|
|
description = "My first scope!"
|
|
|
|
|
scope_id = boundary_scope.org.id
|
|
|
|
|
auto_create_admin_role = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resource "boundary_credential_store_static" "example" {
|
|
|
|
|
name = "example_static_credential_store"
|
|
|
|
|
description = "My first static credential store!"
|
|
|
|
|
scope_id = boundary_scope.project.id
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resource "boundary_credential_ssh_private_key" "example" {
|
|
|
|
|
name = "example_ssh_private_key"
|
2022-08-25 22:31:34 -07:00
|
|
|
description = "My first ssh private key credential!"
|
2022-08-25 20:39:36 -07:00
|
|
|
credential_store_id = boundary_credential_store_static.example.id
|
|
|
|
|
username = "my-username"
|
2022-08-26 10:43:27 -07:00
|
|
|
private_key = file("~/.ssh/id_rsa") # change to valid SSH Private Key
|
|
|
|
|
private_key_passphrase = "optional-passphrase" # change to the passphrase of the Private Key if required
|
2022-08-25 20:39:36 -07:00
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
<!-- schema generated by tfplugindocs -->
|
|
|
|
|
## Schema
|
|
|
|
|
|
|
|
|
|
### Required
|
|
|
|
|
|
|
|
|
|
- `credential_store_id` (String) ID of the credential store this credential belongs to.
|
2022-09-21 10:24:34 -07:00
|
|
|
- `private_key` (String, Sensitive) The private key associated with the credential.
|
2022-08-25 20:39:36 -07:00
|
|
|
- `username` (String) The username associated with the credential.
|
|
|
|
|
|
|
|
|
|
### Optional
|
|
|
|
|
|
|
|
|
|
- `description` (String) The description of the credential.
|
|
|
|
|
- `name` (String) The name of the credential. Defaults to the resource name.
|
2022-09-21 10:24:34 -07:00
|
|
|
- `private_key_passphrase` (String, Sensitive) The passphrase of the private key associated with the credential.
|
2022-08-25 20:39:36 -07:00
|
|
|
|
|
|
|
|
### Read-Only
|
|
|
|
|
|
|
|
|
|
- `id` (String) The ID of the credential.
|
|
|
|
|
- `private_key_hmac` (String) The private key hmac.
|
|
|
|
|
- `private_key_passphrase_hmac` (String) The private key passphrase hmac.
|
|
|
|
|
|
|
|
|
|
## Import
|
|
|
|
|
|
|
|
|
|
Import is supported using the following syntax:
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
terraform import boundary_credential_ssh_private_key.example_ssh_private_key <my-id>
|
|
|
|
|
```
|