Browse Source

Prevent Destroy as an option for RDS

Roberto Barbosa 8 years ago
parent
commit
0ff1ed748b
2 changed files with 4 additions and 1 deletions
  1. 1 1
      rds/main.tf
  2. 3 0
      rds/variables.tf

+ 1 - 1
rds/main.tf

@@ -24,7 +24,7 @@ resource "aws_db_instance" "postgresql" {
       role= "nuxeo.db"
     }
 	lifecycle {
-	    prevent_destroy = true
+	    prevent_destroy = ${var.prevent_destroy}
 	}
 }
 

+ 3 - 0
rds/variables.tf

@@ -32,6 +32,9 @@ variable "rds_allocated_storage" {
     default = "10"
 }
 
+variable "prevent_destroy" {
+	default = "true"
+}
 
 variable "rds_engine_version" {
     // For valid engine versions, see: