diff --git a/README.md b/README.md index 657d5fe..d6a9170 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Functional examples are included in the | decrypters | List of comma-separated owners for each key declared in set\_decrypters\_for. | `list(string)` | `[]` | no | | encrypters | List of comma-separated owners for each key declared in set\_encrypters\_for. | `list(string)` | `[]` | no | | key\_algorithm | The algorithm to use when creating a version based on this template. See the https://cloud.google.com/kms/docs/reference/rest/v1/CryptoKeyVersionAlgorithm for possible inputs. | `string` | `"GOOGLE_SYMMETRIC_ENCRYPTION"` | no | -| key\_destroy\_scheduled\_duration | Set The period of time that versions of keys spend in the DESTROY\_SCHEDULED state before transitioning to DESTROYED. | `string` | `"86400"` | no | +| key\_destroy\_scheduled\_duration | Set The period of time that versions of keys spend in the DESTROY\_SCHEDULED state before transitioning to DESTROYED. | `string` | `"86400s"` | no | | key\_protection\_level | The protection level to use when creating a version based on this template. Default value: "SOFTWARE" Possible values: ["SOFTWARE", "HSM"] | `string` | `"SOFTWARE"` | no | | key\_rotation\_period | Generate a new key every time this period passes. | `string` | `"100000s"` | no | | keyring | Keyring name. | `string` | n/a | yes | diff --git a/main.tf b/main.tf index 57f7eb2..f43d964 100644 --- a/main.tf +++ b/main.tf @@ -35,7 +35,7 @@ resource "google_kms_crypto_key" "key" { prevent_destroy = true } - destroy_scheduled_duration = var.key_destroy_scheduled_duration + destroy_scheduled_duration = var.key_destroy_scheduled_duration version_template { algorithm = var.key_algorithm @@ -56,7 +56,7 @@ resource "google_kms_crypto_key" "key_ephemeral" { prevent_destroy = false } - destroy_scheduled_duration = var.key_destroy_scheduled_duration + destroy_scheduled_duration = var.key_destroy_scheduled_duration version_template { algorithm = var.key_algorithm diff --git a/variables.tf b/variables.tf index cfa6d07..7ee9a02 100644 --- a/variables.tf +++ b/variables.tf @@ -44,8 +44,8 @@ variable "prevent_destroy" { variable "key_destroy_scheduled_duration" { description = "Set The period of time that versions of keys spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED." - type = string - default = "86400" + type = string + default = "86400s" } variable "purpose" {