terraform-provider-stackitp.../docs/data-sources/key_pair.md
João Palet 153947fd7b
Implement key pair resource (#578)
* feat: Implement key pair resource

* feat: Implement acceptance test

* fix: Minor fixes to server and public IP resources

* fix: Lint fixes

* fix: Generalize description

* feat: Update examples to read key from file; Add datasource example

* fix: Fix field descriptions

* fix: Fix example

* feat: Add link to key pair resource in server example

* feat: Add links to key pair resource in other examples
2024-11-05 09:50:55 +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>`.