File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ Functional examples are included in the
5050| key\_ rotation\_ period | | string | ` "100000s" ` | no |
5151| keyring | Keyring name. | string | n/a | yes |
5252| keys | Key names. | list(string) | ` <list> ` | no |
53+ | labels | Labels, provided as a map | map(string) | ` <map> ` | no |
5354| location | Location for the keyring. | string | n/a | yes |
5455| owners | List of comma-separated owners for each key declared in set_owners_for. | list(string) | ` <list> ` | no |
5556| prevent\_ destroy | Set the prevent_destroy lifecycle attribute on keys. | string | ` "true" ` | no |
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ resource "google_kms_crypto_key" "key" {
3838 algorithm = var. key_algorithm
3939 protection_level = var. key_protection_level
4040 }
41+
42+ labels = var. labels
4143}
4244
4345resource "google_kms_crypto_key" "key_ephemeral" {
@@ -54,6 +56,8 @@ resource "google_kms_crypto_key" "key_ephemeral" {
5456 algorithm = var. key_algorithm
5557 protection_level = var. key_protection_level
5658 }
59+
60+ labels = var. labels
5761}
5862
5963resource "google_kms_crypto_key_iam_binding" "owners" {
Original file line number Diff line number Diff line change @@ -93,3 +93,9 @@ variable "key_protection_level" {
9393 description = " The protection level to use when creating a version based on this template. Default value: \" SOFTWARE\" Possible values: [\" SOFTWARE\" , \" HSM\" ]"
9494 default = " SOFTWARE"
9595}
96+
97+ variable "labels" {
98+ type = map (string )
99+ description = " Labels, provided as a map"
100+ default = {}
101+ }
You can’t perform that action at this time.
0 commit comments