File tree Expand file tree Collapse file tree 4 files changed +9
-0
lines changed Expand file tree Collapse file tree 4 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ The module will create:
28
28
- ` storage_type ` - One of ` standard ` (magnetic), ` gp2 ` (general purpose SSD), or ` io1 ` (provisioned IOPS SSD). Default ` standard ` (magnetic)
29
29
- ` iops ` - The amount of provisioned IOPS. Setting this implies a storage_type of ` io1 ` . Default is ` 0 ` if rds storage type is not ` io1 `
30
30
- ` allocated_storage ` - The number of GBs to allocate for DB storage. Must be an integer, _ e.g._ ` 10 `
31
+ - ` storage_encrypted ` - (Optional) Specifies whether the DB instance is encrypted. The default is false if not specified.
31
32
- ` engine ` - Engine type, such as ` mysql ` or ` postgres `
32
33
- ` engine_version ` - DB Engine version, _ e.g._ ` 9.5.4 ` for ` Postgres `
33
34
- ` instance_class ` - Instance class, _ e.g._ ` db.t2.micro `
@@ -79,6 +80,7 @@ module "rds_instance" {
79
80
multi_az = true
80
81
storage_type = "gp2"
81
82
allocated_storage = "100"
83
+ storage_encrypted = true
82
84
engine = "mysql"
83
85
engine_version = "5.7.17"
84
86
instance_class = "db.t2.medium"
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ resource "aws_db_instance" "default" {
28
28
engine_version = " ${ var . engine_version } "
29
29
instance_class = " ${ var . instance_class } "
30
30
allocated_storage = " ${ var . allocated_storage } "
31
+ storage_encrypted = " ${ var . storage_encrypted } "
31
32
vpc_security_group_ids = [" ${ aws_security_group . default . id } " ]
32
33
db_subnet_group_name = " ${ aws_db_subnet_group . default . name } "
33
34
parameter_group_name = " ${ aws_db_parameter_group . default . name } "
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ module "rds_instance" {
13
13
multi_az = true
14
14
storage_type = " gp2"
15
15
allocated_storage = " 100"
16
+ storage_encrypted = false
16
17
engine = " mysql"
17
18
engine_version = " 5.7.17"
18
19
instance_class = " db.t2.medium"
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ variable "storage_type" {
38
38
default = " standard"
39
39
}
40
40
41
+ variable "storage_encrypted" {
42
+ description = " (Optional) Specifies whether the DB instance is encrypted. The default is false if not specified."
43
+ default = false
44
+ }
45
+
41
46
variable "iops" {
42
47
description = " The amount of provisioned IOPS. Setting this implies a storage_type of 'io1'. Default is 0 if rds storage type is not 'io1'"
43
48
default = " 0"
You can’t perform that action at this time.
0 commit comments