From 4c1f8db32d6d63eaa0f1521259f6aa91a52d7fbb Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Sat, 14 Nov 2015 17:47:58 +0000 Subject: [PATCH] aws: kms_key - Change field name (deletion_window -> deletion_window_in_days) --- builtin/providers/aws/resource_aws_kms_key.go | 4 ++-- website/source/docs/providers/aws/r/kms_key.html.markdown | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/builtin/providers/aws/resource_aws_kms_key.go b/builtin/providers/aws/resource_aws_kms_key.go index f9954bef84..2066839b7b 100644 --- a/builtin/providers/aws/resource_aws_kms_key.go +++ b/builtin/providers/aws/resource_aws_kms_key.go @@ -50,7 +50,7 @@ func resourceAwsKmsKey() *schema.Resource { Optional: true, Computed: true, }, - "deletion_window": &schema.Schema{ + "deletion_window_in_days": &schema.Schema{ Type: schema.TypeInt, Optional: true, ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { @@ -165,7 +165,7 @@ func resourceAwsKmsKeyDelete(d *schema.ResourceData, meta interface{}) error { req := &kms.ScheduleKeyDeletionInput{ KeyId: aws.String(keyId), } - if v, exists := d.GetOk("deletion_window"); exists { + if v, exists := d.GetOk("deletion_window_in_days"); exists { req.PendingWindowInDays = aws.Int64(int64(v.(int))) } _, err := conn.ScheduleKeyDeletion(req) diff --git a/website/source/docs/providers/aws/r/kms_key.html.markdown b/website/source/docs/providers/aws/r/kms_key.html.markdown index 9e6954bd88..be19562462 100644 --- a/website/source/docs/providers/aws/r/kms_key.html.markdown +++ b/website/source/docs/providers/aws/r/kms_key.html.markdown @@ -15,7 +15,7 @@ Provides a KMS customer master key. ``` resource "aws_kms_key" "a" { description = "KMS key 1" - deletion_window = 10 + deletion_window_in_days = 10 } ``` @@ -24,9 +24,11 @@ resource "aws_kms_key" "a" { The following arguments are supported: * `description` - (Optional) The description of the key as viewed in AWS console. -* `key_usage` - (Optional) Specifies the intended use of the key. Currently this defaults to ENCRYPT/DECRYPT, and only symmetric encryption and decryption are supported. +* `key_usage` - (Optional) Specifies the intended use of the key. + Defaults to ENCRYPT/DECRYPT, and only symmetric encryption and decryption are supported. * `policy` - (Optional) A valid policy JSON document. -* `deletion_window` - (Optional) Duration in days after which the key is deleted after destruction of the resource, must be between 7 and 30 days. +* `deletion_window_in_days` - (Optional) Duration in days after which the key is deleted + after destruction of the resource, must be between 7 and 30 days. Defaults to 30 days. ## Attributes Reference