Skip to content

Commit b5c789a

Browse files
mntechguyosterman
authored andcommitted
Adding ability to encrypt redis at rest and ability to enable TLS for… (#15)
* Adding ability to encrypt redis at rest and ability to enable TLS for redis * Including missing files, generate README correctly * Fix regression on availability_zone variable (wrong default) * Fixing spacing
1 parent 582f873 commit b5c789a

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ It's 100% Open Source and licensed under the [APACHE2](LICENSE).
1919

2020

2121

22+
23+
24+
25+
26+
2227
## Usage
2328

2429
Include this repository as a module in your existing terraform code:
@@ -70,9 +75,10 @@ Available targets:
7075
| alarm_cpu_threshold_percent | CPU threshold alarm level | string | `75` | no |
7176
| alarm_memory_threshold_bytes | Ram threshold alarm level | string | `10000000` | no |
7277
| apply_immediately | Apply changes immediately | string | `true` | no |
78+
| at_rest_encryption_enabled | Enable encryption at rest | string | `false` | no |
7379
| attributes | Additional attributes (_e.g._ "1") | list | `<list>` | no |
7480
| automatic_failover | Automatic failover (Not available for T1/T2 instances) | string | `false` | no |
75-
| availability_zones | Availability zone ids | list | `Availability zone ids` | no |
81+
| availability_zones | Availability zone ids | list | `<list>` | no |
7682
| cluster_size | Count of nodes in cluster | string | `1` | no |
7783
| delimiter | Delimiter between `name`, `namespace`, `stage` and `attributes` | string | `-` | no |
7884
| enabled | Set to false to prevent the module from creating any resources | string | `true` | no |
@@ -88,6 +94,7 @@ Available targets:
8894
| stage | Stage | string | `default` | no |
8995
| subnets | AWS subnet ids | list | `<list>` | no |
9096
| tags | Additional tags (_e.g._ map("BusinessUnit","ABC") | map | `<map>` | no |
97+
| transit_encryption_enabled | Enable TLS | string | `false` | no |
9198
| vpc_id | AWS VPC id | string | `REQUIRED` | no |
9299
| zone_id | Route53 DNS Zone id | string | `false` | no |
93100

@@ -181,6 +188,13 @@ See [LICENSE](LICENSE) for full details.
181188
under the License.
182189

183190

191+
192+
193+
194+
195+
196+
197+
184198
## Trademarks
185199

186200
All other trademarks referenced herein are the property of their respective owners.

docs/terraform.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
| alarm_cpu_threshold_percent | CPU threshold alarm level | string | `75` | no |
88
| alarm_memory_threshold_bytes | Ram threshold alarm level | string | `10000000` | no |
99
| apply_immediately | Apply changes immediately | string | `true` | no |
10+
| at_rest_encryption_enabled | Enable encryption at rest | string | `false` | no |
1011
| attributes | Additional attributes (_e.g._ "1") | list | `<list>` | no |
1112
| automatic_failover | Automatic failover (Not available for T1/T2 instances) | string | `false` | no |
12-
| availability_zones | Availability zone ids | list | `Availability zone ids` | no |
13+
| availability_zones | Availability zone ids | list | `<list>` | no |
1314
| cluster_size | Count of nodes in cluster | string | `1` | no |
1415
| delimiter | Delimiter between `name`, `namespace`, `stage` and `attributes` | string | `-` | no |
1516
| enabled | Set to false to prevent the module from creating any resources | string | `true` | no |
@@ -25,6 +26,7 @@
2526
| stage | Stage | string | `default` | no |
2627
| subnets | AWS subnet ids | list | `<list>` | no |
2728
| tags | Additional tags (_e.g._ map("BusinessUnit","ABC") | map | `<map>` | no |
29+
| transit_encryption_enabled | Enable TLS | string | `false` | no |
2830
| vpc_id | AWS VPC id | string | `REQUIRED` | no |
2931
| zone_id | Route53 DNS Zone id | string | `false` | no |
3032

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ resource "aws_elasticache_replication_group" "default" {
6262
maintenance_window = "${var.maintenance_window}"
6363
notification_topic_arn = "${var.notification_topic_arn}"
6464
engine_version = "${var.engine_version}"
65+
at_rest_encryption_enabled = "${var.at_rest_encryption_enabled}"
66+
transit_encryption_enabled = "${var.transit_encryption_enabled}"
6567

6668
tags = "${module.label.tags}"
6769
}

variables.tf

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ variable "engine_version" {
6565
description = "Redis engine version"
6666
}
6767

68+
variable "at_rest_encryption_enabled" {
69+
default = "false"
70+
description = "Enable encryption at rest"
71+
}
72+
73+
variable "transit_encryption_enabled" {
74+
default = "false"
75+
description = "Enable TLS"
76+
}
77+
6878
variable "notification_topic_arn" {
6979
default = "10000000"
7080
description = "Notification topic arn"
@@ -100,7 +110,7 @@ variable "automatic_failover" {
100110
variable "availability_zones" {
101111
type = "list"
102112
description = "Availability zone ids"
103-
default = "Availability zone ids"
113+
default = []
104114
}
105115

106116
variable "zone_id" {

0 commit comments

Comments
 (0)