38 lines
1.2 KiB
HCL
38 lines
1.2 KiB
HCL
resource "stackit_kms_keyring" "mshalpha-keyring" {
|
|
project_id = var.project_id
|
|
display_name = "msh-alpha-tests"
|
|
description = "This is a test keyring for private endpoints"
|
|
}
|
|
|
|
resource "stackit_kms_key" "mshalpha-key01" {
|
|
project_id = var.project_id
|
|
keyring_id = stackit_kms_keyring.mshalpha-keyring.keyring_id
|
|
display_name = "mshalpha-key01"
|
|
protection = "software"
|
|
algorithm = "aes_256_gcm"
|
|
purpose = "symmetric_encrypt_decrypt"
|
|
access_scope = "SNA"
|
|
}
|
|
|
|
output "keyid" {
|
|
value = stackit_kms_key.mshalpha-key01.key_id
|
|
}
|
|
|
|
# (because stackit_kms_key.key001 is not in configuration)
|
|
resource "stackit_kms_key" "key001" {
|
|
access_scope = "SNA"
|
|
algorithm = "aes_256_gcm"
|
|
display_name = "msh-key-sna01"
|
|
keyring_id = stackit_kms_keyring.keyring001.keyring_id
|
|
project_id = var.project_id
|
|
protection = "software"
|
|
purpose = "symmetric_encrypt_decrypt"
|
|
}
|
|
|
|
# stackit_kms_keyring.keyring001 will be destroyed
|
|
# (because stackit_kms_keyring.keyring001 is not in configuration)
|
|
resource "stackit_kms_keyring" "keyring001" {
|
|
description = "This is a test keyring for private endpoints"
|
|
display_name = "msh-keyring-sna01"
|
|
project_id = var.project_id
|
|
}
|