Commit 310a0803 authored by Felipe Martin's avatar Felipe Martin

Merge branch 'encryption' of github.com:fmartingr/terraform-aws-rds into encryption

parents 78e3f63c a1b1a8c2
...@@ -65,5 +65,7 @@ module "db_instance" { ...@@ -65,5 +65,7 @@ module "db_instance" {
backup_retention_period = "${var.backup_retention_period}" backup_retention_period = "${var.backup_retention_period}"
backup_window = "${var.backup_window}" backup_window = "${var.backup_window}"
storage_encrypted = "${var.encrypted}"
tags = "${var.tags}" tags = "${var.tags}"
} }
...@@ -36,5 +36,7 @@ resource "aws_db_instance" "this" { ...@@ -36,5 +36,7 @@ resource "aws_db_instance" "this" {
backup_retention_period = "${var.backup_retention_period}" backup_retention_period = "${var.backup_retention_period}"
backup_window = "${var.backup_window}" backup_window = "${var.backup_window}"
storage_encrypted = "${var.storage_encrypted}"
tags = "${merge(var.tags, map("Name", format("%s", var.identifier)))}" tags = "${merge(var.tags, map("Name", format("%s", var.identifier)))}"
} }
...@@ -126,3 +126,8 @@ variable "tags" { ...@@ -126,3 +126,8 @@ variable "tags" {
description = "A mapping of tags to assign to all resources" description = "A mapping of tags to assign to all resources"
default = {} default = {}
} }
variable "storage_encrypted" {
description = "Defines if the storage should be encrypted or not"
default = false
}
...@@ -122,6 +122,11 @@ variable "tags" { ...@@ -122,6 +122,11 @@ variable "tags" {
default = {} default = {}
} }
variable "encrypted" {
description = "Defines wether this instance should be encrypted or not"
default = false
}
# DB subnet group # DB subnet group
variable "subnet_ids" { variable "subnet_ids" {
type = "list" 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