Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ module "db" {
| parameters | A list of DB parameters (map) to apply | list(map(string)) | `[]` | no |
| password | Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file | string | n/a | yes |
| performance\_insights\_enabled | Specifies whether Performance Insights are enabled | bool | `"false"` | no |
| performance\_insights\_retention\_period | The amount of time in days to retain Performance Insights data. Either 7 (7 days) or 731 (2 years). | number | `7` | no |
| port | The port on which the DB accepts connections | string | n/a | yes |
| publicly\_accessible | Bool to control if instance is publicly accessible | bool | `"false"` | no |
| replicate\_source\_db | Specifies that this resource is a Replicate database, and to use this value as the source database. This correlates to the identifier of another Amazon RDS Database to replicate. | string | `""` | no |
Expand Down
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ module "db_instance" {
copy_tags_to_snapshot = var.copy_tags_to_snapshot
final_snapshot_identifier = var.final_snapshot_identifier

performance_insights_enabled = var.performance_insights_enabled
performance_insights_enabled = var.performance_insights_enabled
performance_insights_retention_period = var.performance_insights_retention_period

backup_retention_period = var.backup_retention_period
backup_window = var.backup_window
Expand Down
21 changes: 12 additions & 9 deletions modules/db_instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ resource "aws_db_instance" "this" {
final_snapshot_identifier = var.final_snapshot_identifier
max_allocated_storage = var.max_allocated_storage

performance_insights_enabled = var.performance_insights_enabled
performance_insights_enabled = var.performance_insights_enabled
performance_insights_retention_period = var.performance_insights_retention_period

backup_retention_period = var.backup_retention_period
backup_window = var.backup_window
Expand Down Expand Up @@ -142,15 +143,17 @@ resource "aws_db_instance" "this_mssql" {
monitoring_interval = var.monitoring_interval
monitoring_role_arn = coalesce(var.monitoring_role_arn, aws_iam_role.enhanced_monitoring.*.arn, null)

allow_major_version_upgrade = var.allow_major_version_upgrade
auto_minor_version_upgrade = var.auto_minor_version_upgrade
apply_immediately = var.apply_immediately
maintenance_window = var.maintenance_window
skip_final_snapshot = var.skip_final_snapshot
copy_tags_to_snapshot = var.copy_tags_to_snapshot
final_snapshot_identifier = var.final_snapshot_identifier
allow_major_version_upgrade = var.allow_major_version_upgrade
auto_minor_version_upgrade = var.auto_minor_version_upgrade
apply_immediately = var.apply_immediately
maintenance_window = var.maintenance_window
skip_final_snapshot = var.skip_final_snapshot
copy_tags_to_snapshot = var.copy_tags_to_snapshot
final_snapshot_identifier = var.final_snapshot_identifier
max_allocated_storage = var.max_allocated_storage
performance_insights_enabled = var.performance_insights_enabled

performance_insights_enabled = var.performance_insights_enabled
performance_insights_retention_period = var.performance_insights_retention_period

backup_retention_period = var.backup_retention_period
backup_window = var.backup_window
Expand Down
8 changes: 7 additions & 1 deletion modules/db_instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,14 @@ variable "performance_insights_enabled" {
default = false
}

variable "performance_insights_retention_period" {
description = "The amount of time in days to retain Performance Insights data. Either 7 (7 days) or 731 (2 years)."
type = number
default = 7
}

variable "max_allocated_storage" {
description = "Specifies the value for Storage Autoscaling"
type = number
default = 0
}
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ variable "performance_insights_enabled" {
default = false
}

variable "performance_insights_retention_period" {
description = "The amount of time in days to retain Performance Insights data. Either 7 (7 days) or 731 (2 years)."
type = number
default = 7
}

variable "max_allocated_storage" {
description = "Specifies the value for Storage Autoscaling"
type = number
Expand Down