Skip to content

Commit 65a7e18

Browse files
committed
chore: enable deletion_protection by default and update docs
1 parent 6b3ea29 commit 65a7e18

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ terraform output -raw db_connection_uri
9090
| backup_window | The daily time range for automated backups | `string` | `"03:00-04:00"` |
9191
| maintenance_window | The window to perform maintenance in | `string` | `"Mon:04:00-Mon:05:00"` |
9292
| skip_final_snapshot | Skip final snapshot before deletion | `bool` | `false` |
93+
| deletion_protection | Prevent accidental deletion of the DB instance | `bool` | `true` |
9394
| ingress_cidr_blocks | List of CIDR blocks to allow access to the database | `list(string)` | `["0.0.0.0/0"]` |
9495
| egress_cidr_blocks | List of CIDR blocks to allow egress traffic from the database | `list(string)` | `["0.0.0.0/0"]` |
9596
| tags | A mapping of tags to assign to all resources | `map(string)` | `{}` |
@@ -121,6 +122,7 @@ terraform output -raw db_connection_uri
121122
- The module uses Kubernetes backend configuration. Ensure your Terraform environment is properly configured for this.
122123
- The password is generated at apply time and marked as a sensitive output. Store it securely (e.g., AWS Secrets Manager) rather than relying on CLI history.
123124
- Ensure `name_prefix` conforms to AWS naming constraints for RDS identifiers (letters, numbers, hyphens; must start with a letter; max 63 characters).
125+
- Deletion protection is enabled by default. Set `deletion_protection = false` before destroying the instance.
124126

125127
## License
126128

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ variable "skip_final_snapshot" {
152152
default = true
153153
}
154154

155+
variable "deletion_protection" {
156+
description = "Enable deletion protection to prevent accidental DB instance deletion"
157+
type = bool
158+
default = true
159+
}
160+
155161
variable "tags" {
156162
description = "A mapping of tags to assign to all resources"
157163
type = map(string)

0 commit comments

Comments
 (0)