Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
terraform-aws-rds
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Terraform Modules
terraform-aws-rds
Commits
a90f423f
Commit
a90f423f
authored
Oct 06, 2018
by
Bill Wang
Committed by
Anton Babenko
Oct 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add deletion protection argument (#83)
* Add-deletion_protection-argument * Add-deletion_protection-argument
parent
4c390c90
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
33 additions
and
0 deletions
+33
-0
README.md
README.md
+3
-0
main.tf
examples/complete-mssql/main.tf
+3
-0
main.tf
examples/complete-mysql/main.tf
+3
-0
main.tf
examples/complete-oracle/main.tf
+3
-0
main.tf
examples/complete-postgres/main.tf
+3
-0
main.tf
examples/enhanced-monitoring/main.tf
+2
-0
main.tf
main.tf
+2
-0
main.tf
modules/db_instance/main.tf
+4
-0
variables.tf
modules/db_instance/variables.tf
+5
-0
variables.tf
variables.tf
+5
-0
No files found.
README.md
View file @
a90f423f
...
...
@@ -64,6 +64,9 @@ module "db" {
# Snapshot name upon DB deletion
final_snapshot_identifier
=
"demodb"
# Database Deletion Protection
deletion_protection
=
true
parameters
=
[
{
name
=
"character_set_client"
...
...
examples/complete-mssql/main.tf
View file @
a90f423f
...
...
@@ -60,4 +60,7 @@ module "db" {
license_model
=
"license-included"
timezone
=
"Central Standard Time"
# Database Deletion Protection
deletion_protection
=
true
}
examples/complete-mysql/main.tf
View file @
a90f423f
...
...
@@ -68,6 +68,9 @@ module "db" {
# Snapshot name upon DB deletion
final_snapshot_identifier
=
"demodb"
# Database Deletion Protection
deletion_protection
=
true
options
=
[
{
option_name
=
"MARIADB_AUDIT_PLUGIN"
...
...
examples/complete-oracle/main.tf
View file @
a90f423f
...
...
@@ -66,4 +66,7 @@ module "db" {
# See here for support character sets https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.OracleCharacterSets.html
character_set_name
=
"AL32UTF8"
# Database Deletion Protection
deletion_protection
=
true
}
examples/complete-postgres/main.tf
View file @
a90f423f
...
...
@@ -67,4 +67,7 @@ module "db" {
# Snapshot name upon DB deletion
final_snapshot_identifier
=
"demodb"
# Database Deletion Protection
deletion_protection
=
true
}
examples/enhanced-monitoring/main.tf
View file @
a90f423f
...
...
@@ -82,4 +82,6 @@ module "db" {
major_engine_version
=
"5.7"
monitoring_interval
=
"30"
monitoring_role_arn
=
"
${
aws_iam_role
.
rds_enhanced_monitoring
.
arn
}
"
# Database Deletion Protection
deletion_protection
=
true
}
main.tf
View file @
a90f423f
...
...
@@ -104,5 +104,7 @@ module "db_instance" {
timeouts
=
"
${
var
.
timeouts
}
"
deletion_protection
=
"
${
var
.
deletion_protection
}
"
tags
=
"
${
var
.
tags
}
"
}
modules/db_instance/main.tf
View file @
a90f423f
...
...
@@ -69,6 +69,8 @@ resource "aws_db_instance" "this" {
timeouts
=
"
${
var
.
timeouts
}
"
deletion_protection
=
"
${
var
.
deletion_protection
}
"
tags
=
"
${
merge
(
var
.
tags
,
map
(
"Name"
,
format
(
"%s"
,
var
.
identifier
)))
}
"
}
...
...
@@ -125,5 +127,7 @@ resource "aws_db_instance" "this_mssql" {
timeouts
=
"
${
var
.
timeouts
}
"
deletion_protection
=
"
${
var
.
deletion_protection
}
"
tags
=
"
${
merge
(
var
.
tags
,
map
(
"Name"
,
format
(
"%s"
,
var
.
identifier
)))
}
"
}
modules/db_instance/variables.tf
View file @
a90f423f
...
...
@@ -208,3 +208,8 @@ variable "timeouts" {
delete
=
"40m"
}
}
variable
"deletion_protection"
{
description
=
"The database can't be deleted when this value is set to true."
default
=
false
}
variables.tf
View file @
a90f423f
...
...
@@ -258,3 +258,8 @@ variable "timeouts" {
delete
=
"40m"
}
}
variable
"deletion_protection"
{
description
=
"The database can't be deleted when this value is set to true."
default
=
false
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment