Commit a1b1a8c2 authored by Felipe Martin's avatar Felipe Martin

Using `encrypted` to set the db_instance.storage_encrypted

parent 0e1f9c7a
......@@ -63,5 +63,7 @@ module "db_instance" {
backup_retention_period = "${var.backup_retention_period}"
backup_window = "${var.backup_window}"
storage_encrypted = "${var.encrypted}"
tags = "${var.tags}"
}
......@@ -34,5 +34,7 @@ resource "aws_db_instance" "this" {
backup_retention_period = "${var.backup_retention_period}"
backup_window = "${var.backup_window}"
storage_encrypted = "${var.storage_encrypted}"
tags = "${merge(var.tags, map("Name", format("%s", var.identifier)))}"
}
......@@ -116,3 +116,8 @@ variable "tags" {
description = "A mapping of tags to assign to all resources"
default = {}
}
variable "storage_encrypted" {
description = "Defines if the storage should be encrypted or not"
default = false
}
......@@ -112,6 +112,11 @@ variable "tags" {
default = {}
}
variable "encrypted" {
description = "Defines wether this instance should be encrypted or not"
default = false
}
# DB subnet group
variable "subnet_ids" {
type = "list"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment