-
Notifications
You must be signed in to change notification settings - Fork 35
first steps for kms key-ring resource and datasource #897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
a7259ff
6f6d063
5b59eb6
185fed5
6bcc14a
d320073
bcd0528
99e2b7f
8c654ad
219adac
1186cee
cb23a4e
8d0da16
2732c4a
b483c13
248748e
d41ad9d
77a623e
7df0307
d87d60f
438da14
889b222
0ce560c
cd6f006
7c0e4b2
170e000
d4aad10
96e695d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_kms_key Data Source - stackit" | ||
subcategory: "" | ||
description: |- | ||
KMS Key resource schema. Must have a region specified in the provider configuration. | ||
--- | ||
|
||
# stackit_kms_key (Data Source) | ||
|
||
KMS Key resource schema. Must have a `region` specified in the provider configuration. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `algorithm` (String) The encryption algorithm that the key will use to encrypt data | ||
- `display_name` (String) The display name to distinguish multiple keys | ||
- `import_only` (Boolean) Terraform's internal resource ID. It is structured as "`project_id`,`instance_id`". | ||
- `key_id` (String) | ||
- `key_ring_id` (String) The ID of the associated key ring | ||
- `project_id` (String) STACKIT project ID to which the key ring is associated. | ||
- `protection` (String) The underlying system that is responsible for protecting the key material. Currently only software is accepted. | ||
- `purpose` (String) The purpose for which the key will be used | ||
|
||
### Optional | ||
|
||
- `access_scope` (String) The access scope of the key. Default is PUBLIC. | ||
- `description` (String) A user chosen description to distinguish multiple keys | ||
- `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`,`instance_id`". |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_kms_key_ring Data Source - stackit" | ||
subcategory: "" | ||
description: |- | ||
KMS Key Ring resource schema. | ||
--- | ||
|
||
# stackit_kms_key_ring (Data Source) | ||
|
||
KMS Key Ring resource schema. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `key_ring_id` (String) An auto generated unique id which identifies the key ring. | ||
- `project_id` (String) STACKIT project ID to which the key ring is associated. | ||
|
||
### Read-Only | ||
|
||
- `description` (String) A user chosen description to distinguish multiple key rings. | ||
- `display_name` (String) A user chosen description to distinguish multiple key rings. | ||
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`instance_id`". | ||
- `region` (String) The resource region. If not defined, the provider region is used. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_kms_wrapping_key Data Source - stackit" | ||
subcategory: "" | ||
description: |- | ||
KMS Key resource schema. Must have a region specified in the provider configuration. | ||
--- | ||
|
||
# stackit_kms_wrapping_key (Data Source) | ||
|
||
KMS Key resource schema. Must have a `region` specified in the provider configuration. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `algorithm` (String) The encryption algorithm that the key will use to encrypt data | ||
- `display_name` (String) The display name to distinguish multiple keys | ||
- `key_ring_id` (String) The ID of the associated key ring | ||
- `project_id` (String) STACKIT project ID to which the key ring is associated. | ||
- `protection` (String) The underlying system that is responsible for protecting the key material. Currently only software is accepted. | ||
- `purpose` (String) The purpose for which the key will be used | ||
- `wrapping_key_id` (String) | ||
|
||
### Optional | ||
|
||
- `access_scope` (String) The access scope of the key. Default is PUBLIC. | ||
- `description` (String) A user chosen description to distinguish multiple keys | ||
- `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`,`instance_id`". |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_kms_key Resource - stackit" | ||
subcategory: "" | ||
description: |- | ||
KMS Key resource schema. Must have a region specified in the provider configuration. | ||
--- | ||
|
||
# stackit_kms_key (Resource) | ||
|
||
KMS Key resource schema. Must have a `region` specified in the provider configuration. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "stackit_kms_key" "name" { | ||
algorithm = "example algorithm" | ||
backend = "software" | ||
description = "new descr" | ||
display_name = "example name" | ||
import_only = false | ||
key_ring_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
purpose = "example purpose" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `algorithm` (String) The encryption algorithm that the key will use to encrypt data | ||
- `display_name` (String) The display name to distinguish multiple keys | ||
- `key_ring_id` (String) The ID of the associated key ring | ||
- `project_id` (String) STACKIT project ID to which the key ring is associated. | ||
- `protection` (String) The underlying system that is responsible for protecting the key material. Currently only software is accepted. | ||
- `purpose` (String) The purpose for which the key will be used | ||
|
||
### Optional | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regarding the api spec |
||
- `access_scope` (String) The access scope of the key. Default is PUBLIC. | ||
- `description` (String) A user chosen description to distinguish multiple keys | ||
- `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`,`instance_id`". | ||
- `import_only` (Boolean) Specifies if the the key should be import_only | ||
- `key_id` (String) The ID of the key |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_kms_key_ring Resource - stackit" | ||
subcategory: "" | ||
description: |- | ||
KMS Key Ring resource schema. Must have a region specified in the provider configuration. | ||
--- | ||
|
||
# stackit_kms_key_ring (Resource) | ||
|
||
KMS Key Ring resource schema. Must have a `region` specified in the provider configuration. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "stackit_kms_key_ring" "example" { | ||
description = "example description" | ||
display_name = "example name" | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
region_id = "eu01" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `display_name` (String) A user chosen description to distinguish multiple key rings. | ||
- `project_id` (String) STACKIT project ID to which the key ring is associated. | ||
|
||
### Optional | ||
|
||
- `description` (String) A user chosen description to distinguish multiple key rings. | ||
- `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`,`key_ring_id`". | ||
- `key_ring_id` (String) An auto generated unique id which identifies the key ring. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_kms_wrapping_key Resource - stackit" | ||
subcategory: "" | ||
description: |- | ||
KMS Key resource schema. Must have a region specified in the provider configuration. | ||
--- | ||
|
||
# stackit_kms_wrapping_key (Resource) | ||
|
||
KMS Key resource schema. Must have a `region` specified in the provider configuration. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "stackit_kms_wrapping_key" "name" { | ||
algorithm = "example algorithm" | ||
backend = "software" | ||
description = "new descr" | ||
display_name = "example name" | ||
key_ring_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
purpose = "example purpose" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `algorithm` (String) The encryption algorithm that the key will use to encrypt data | ||
- `display_name` (String) The display name to distinguish multiple keys | ||
- `key_ring_id` (String) The ID of the associated key ring | ||
- `project_id` (String) STACKIT project ID to which the key ring is associated. | ||
- `protection` (String) The underlying system that is responsible for protecting the key material. Currently only software is accepted. | ||
- `purpose` (String) The purpose for which the key will be used | ||
|
||
### Optional | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
- `access_scope` (String) The access scope of the key. Default is PUBLIC. | ||
- `description` (String) A user chosen description to distinguish multiple keys | ||
- `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`,`instance_id`". | ||
- `import_only` (Boolean) | ||
- `wrapping_key_id` (String) The ID of the wrapping key |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,10 @@ | ||||||||||||||||||||||||||||||||
resource "stackit_kms_key" "name" { | ||||||||||||||||||||||||||||||||
algorithm = "example algorithm" | ||||||||||||||||||||||||||||||||
backend = "software" | ||||||||||||||||||||||||||||||||
description = "new descr" | ||||||||||||||||||||||||||||||||
display_name = "example name" | ||||||||||||||||||||||||||||||||
import_only = false | ||||||||||||||||||||||||||||||||
key_ring_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||||||||||||||||||||||||||||||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||||||||||||||||||||||||||||||||
purpose = "example purpose" | ||||||||||||||||||||||||||||||||
Comment on lines
+2
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We usually have the
Suggested change
If you want you can also add an additional example, where the |
||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add an example how the resource can be imported, like we have it here terraform-provider-stackit/docs/resources/ske_cluster.md Lines 41 to 45 in 813b8c0
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,6 @@ | ||||||||||||||||||||
resource "stackit_kms_key_ring" "example" { | ||||||||||||||||||||
description = "example description" | ||||||||||||||||||||
display_name = "example name" | ||||||||||||||||||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||||||||||||||||||||
region_id = "eu01" | ||||||||||||||||||||
} | ||||||||||||||||||||
Comment on lines
+2
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change also the order here, so that project_id is first and remove region_id. Also add an import example
Suggested change
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,9 @@ | ||||||||||||||||||||||||||||||
resource "stackit_kms_wrapping_key" "name" { | ||||||||||||||||||||||||||||||
algorithm = "example algorithm" | ||||||||||||||||||||||||||||||
backend = "software" | ||||||||||||||||||||||||||||||
description = "new descr" | ||||||||||||||||||||||||||||||
display_name = "example name" | ||||||||||||||||||||||||||||||
key_ring_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||||||||||||||||||||||||||||||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||||||||||||||||||||||||||||||
purpose = "example purpose" | ||||||||||||||||||||||||||||||
Comment on lines
+2
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change the order, so that project_id and key_ring_id are first. And add an import example
Suggested change
|
||||||||||||||||||||||||||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all three data sources the examples are missing. Please add them in examples/data-sources/<data-source-name>/data-source.tf like you did it for the resources