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:
2828- ` storage_type ` - One of ` standard ` (magnetic), ` gp2 ` (general purpose SSD), or ` io1 ` (provisioned IOPS SSD). Default ` standard ` (magnetic)
2929- ` iops ` - The amount of provisioned IOPS. Setting this implies a storage_type of ` io1 ` . Default is ` 0 ` if rds storage type is not ` io1 `
3030- ` 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.
3132- ` engine ` - Engine type, such as ` mysql ` or ` postgres `
3233- ` engine_version ` - DB Engine version, _ e.g._ ` 9.5.4 ` for ` Postgres `
3334- ` instance_class ` - Instance class, _ e.g._ ` db.t2.micro `
@@ -79,6 +80,7 @@ module "rds_instance" {
7980 multi_az = true
8081 storage_type = "gp2"
8182 allocated_storage = "100"
83+ storage_encrypted = true
8284 engine = "mysql"
8385 engine_version = "5.7.17"
8486 instance_class = "db.t2.medium"
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ resource "aws_db_instance" "default" {
2828 engine_version = " ${ var . engine_version } "
2929 instance_class = " ${ var . instance_class } "
3030 allocated_storage = " ${ var . allocated_storage } "
31+ storage_encrypted = " ${ var . storage_encrypted } "
3132 vpc_security_group_ids = [" ${ aws_security_group . default . id } " ]
3233 db_subnet_group_name = " ${ aws_db_subnet_group . default . name } "
3334 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" {
1313 multi_az = true
1414 storage_type = " gp2"
1515 allocated_storage = " 100"
16+ storage_encrypted = false
1617 engine = " mysql"
1718 engine_version = " 5.7.17"
1819 instance_class = " db.t2.medium"
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ variable "storage_type" {
3838 default = " standard"
3939}
4040
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+
4146variable "iops" {
4247 description = " The amount of provisioned IOPS. Setting this implies a storage_type of 'io1'. Default is 0 if rds storage type is not 'io1'"
4348 default = " 0"
You can’t perform that action at this time.
0 commit comments