feat(kms): add keyring resource and datasource (#1049)

relates to STACKITTPR-410
This commit is contained in:
Ruben Hönle 2025-11-12 14:10:58 +01:00 committed by GitHub
parent c6e1c3d3a8
commit edf22a6193
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 1157 additions and 9 deletions

View file

@ -0,0 +1,38 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_kms_keyring Data Source - stackit"
subcategory: ""
description: |-
KMS Keyring datasource schema. Uses the default_region specified in the provider configuration as a fallback in case no region is defined on datasource level.
---
# stackit_kms_keyring (Data Source)
KMS Keyring datasource schema. Uses the `default_region` specified in the provider configuration as a fallback in case no `region` is defined on datasource level.
## Example Usage
```terraform
data "stackit_kms_keyring" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
keyring_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `keyring_id` (String) An auto generated unique id which identifies the keyring.
- `project_id` (String) STACKIT project ID to which the keyring is associated.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `description` (String) A user chosen description to distinguish multiple keyrings.
- `display_name` (String) The display name to distinguish multiple keyrings.
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`keyring_id`".

View file

@ -162,6 +162,7 @@ Note: AWS specific checks must be skipped as they do not work on STACKIT. For de
- `experiments` (List of String) Enables experiments. These are unstable features without official support. More information can be found in the README. Available Experiments: iam, routing-tables, network
- `git_custom_endpoint` (String) Custom endpoint for the Git service
- `iaas_custom_endpoint` (String) Custom endpoint for the IaaS service
- `kms_custom_endpoint` (String) Custom endpoint for the KMS service
- `loadbalancer_custom_endpoint` (String) Custom endpoint for the Load Balancer service
- `logme_custom_endpoint` (String) Custom endpoint for the LogMe service
- `mariadb_custom_endpoint` (String) Custom endpoint for the MariaDB service

View file

@ -0,0 +1,42 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_kms_keyring Resource - stackit"
subcategory: ""
description: |-
KMS Keyring resource schema. Uses the default_region specified in the provider configuration as a fallback in case no region is defined on resource level.
~> Keyrings will not be destroyed by terraform during a terraform destroy. They will just be thrown out of the Terraform state and not deleted on API side. This way we can ensure no keyring setups are deleted by accident and it gives you the option to recover your keys within the grace period.
---
# stackit_kms_keyring (Resource)
KMS Keyring resource schema. Uses the `default_region` specified in the provider configuration as a fallback in case no `region` is defined on resource level.
~> Keyrings will **not** be destroyed by terraform during a `terraform destroy`. They will just be thrown out of the Terraform state and not deleted on API side. **This way we can ensure no keyring setups are deleted by accident and it gives you the option to recover your keys within the grace period.**
## Example Usage
```terraform
resource "stackit_kms_keyring" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
display_name = "example name"
description = "example description"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `display_name` (String) The display name to distinguish multiple keyrings.
- `project_id` (String) STACKIT project ID to which the keyring is associated.
### Optional
- `description` (String) A user chosen description to distinguish multiple keyrings.
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`keyring_id`".
- `keyring_id` (String) An auto generated unique id which identifies the keyring.