Skip to content

Commit f727ef5

Browse files
ac-hibbertAndy Hibbertactions-bot
authored
add_kms_key_id: Allow user to supply their own kms_key_id (cloudposse#75)
* add_kms_key_id: Allow user to supply their own kms_key_id Change-Id: I23d1288851301328afaa61686b42d8376d303415 * Updated README.md Co-authored-by: Andy Hibbert <[email protected]> Co-authored-by: actions-bot <[email protected]>
1 parent 214683c commit f727ef5

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ Available targets:
187187
| existing\_security\_groups | List of existing Security Group IDs to place the cluster into. Set `use_existing_security_groups` to `true` to enable using `existing_security_groups` as Security Groups for the cluster | `list(string)` | `[]` | no |
188188
| family | Redis family | `string` | `"redis4.0"` | no |
189189
| instance\_type | Elastic cache instance type | `string` | `"cache.t2.micro"` | no |
190+
| kms\_key\_id | The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. `at_rest_encryption_enabled` must be set to `true` | `string` | `null` | no |
190191
| maintenance\_window | Maintenance window | `string` | `"wed:03:00-wed:04:00"` | no |
191192
| name | Name of the application | `string` | n/a | yes |
192193
| namespace | Namespace (e.g. `eg` or `cp`) | `string` | `""` | no |

docs/terraform.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
| existing\_security\_groups | List of existing Security Group IDs to place the cluster into. Set `use_existing_security_groups` to `true` to enable using `existing_security_groups` as Security Groups for the cluster | `list(string)` | `[]` | no |
4040
| family | Redis family | `string` | `"redis4.0"` | no |
4141
| instance\_type | Elastic cache instance type | `string` | `"cache.t2.micro"` | no |
42+
| kms\_key\_id | The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. `at_rest_encryption_enabled` must be set to `true` | `string` | `null` | no |
4243
| maintenance\_window | Maintenance window | `string` | `"wed:03:00-wed:04:00"` | no |
4344
| name | Name of the application | `string` | n/a | yes |
4445
| namespace | Namespace (e.g. `eg` or `cp`) | `string` | `""` | no |

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ resource "aws_elasticache_replication_group" "default" {
9797
engine_version = var.engine_version
9898
at_rest_encryption_enabled = var.at_rest_encryption_enabled
9999
transit_encryption_enabled = var.transit_encryption_enabled
100+
kms_key_id = var.at_rest_encryption_enabled ? var.kms_key_id : null
100101
snapshot_window = var.snapshot_window
101102
snapshot_retention_limit = var.snapshot_retention_limit
102103
apply_immediately = var.apply_immediately

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@ variable "auth_token" {
204204
default = null
205205
}
206206

207+
variable "kms_key_id" {
208+
type = string
209+
description = "The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. `at_rest_encryption_enabled` must be set to `true`"
210+
default = null
211+
}
212+
207213
variable "replication_group_id" {
208214
type = string
209215
description = "Replication group ID with the following constraints: \nA name must contain from 1 to 20 alphanumeric characters or hyphens. \n The first character must be a letter. \n A name cannot end with a hyphen or contain two consecutive hyphens."

0 commit comments

Comments
 (0)