Skip to content

Commit 6ff7ba2

Browse files
committed
Nulll if not enabled
1 parent b390b7f commit 6ff7ba2

File tree

1 file changed

+2
-2
lines changed
  • operations/deployment/terraform/modules/aws/rds

1 file changed

+2
-2
lines changed

operations/deployment/terraform/modules/aws/rds/aws_rds.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ resource "aws_db_instance" "default" {
7878
maintenance_window = var.aws_rds_db_maintenance_window
7979
apply_immediately = var.aws_rds_db_apply_immediately
8080
performance_insights_enabled = var.aws_rds_db_performance_insights_enable
81-
performance_insights_retention_period = var.aws_rds_db_performance_insights_retention
82-
performance_insights_kms_key_id = var.aws_rds_db_performance_insights_kms_key_id
81+
performance_insights_retention_period = aws_rds_db_performance_insights_enable ? var.aws_rds_db_performance_insights_retention : null
82+
performance_insights_kms_key_id = aws_rds_db_performance_insights_enable ? var.aws_rds_db_performance_insights_kms_key_id : null
8383
tags = {
8484
Name = "${var.aws_resource_identifier}-rds"
8585
}

0 commit comments

Comments
 (0)