aws: kms_key - Change field name (deletion_window -> deletion_window_in_days)

This commit is contained in:
Radek Simko 2015-11-14 17:47:58 +00:00 committed by Radek Simko
parent fccffbcbb1
commit 4c1f8db32d
2 changed files with 7 additions and 5 deletions

View File

@ -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)

View File

@ -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