terraform-provider-stackitp.../docs/data-sources/key_pair.md
João Palet b1f928f6be
Implement key pair resource (#588)
* Revert "Revert "Implement key pair resource (#578)" (#581)"

This reverts commit 600847a2ea.

* feat: Update iaas SDK module version; Use beta API in key pair resource
2024-11-11 11:08:05 +00:00

36 lines
1.5 KiB
Markdown

---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_key_pair Data Source - stackit"
subcategory: ""
description: |-
Key pair resource schema. Must have a region specified in the provider configuration.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---
# stackit_key_pair (Data Source)
Key pair resource schema. Must have a `region` specified in the provider configuration.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
## Example Usage
```terraform
data "stackit_key_pair" "example" {
name = "example-key-pair-name"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) The name of the SSH key pair.
### Read-Only
- `fingerprint` (String) The fingerprint of the public SSH key.
- `id` (String) Terraform's internal resource ID. It takes the value of the key pair "`name`".
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container.
- `public_key` (String) A string representation of the public SSH key. E.g., `ssh-rsa <key_data>` or `ssh-ed25519 <key-data>`.