Skip to content

Commit

Permalink
Fix for issue when MonitoringRoleARN is required (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
flmmartins authored and antonbabenko committed Jan 7, 2020
1 parent e015fa3 commit 470077e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/db_instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ resource "aws_db_instance" "this" {
iops = var.iops
publicly_accessible = var.publicly_accessible
monitoring_interval = var.monitoring_interval
monitoring_role_arn = coalesce(var.monitoring_role_arn, aws_iam_role.enhanced_monitoring.*.arn, null)
monitoring_role_arn = var.monitoring_interval > 0 ? coalesce(var.monitoring_role_arn, join(", ", aws_iam_role.enhanced_monitoring.*.arn), null) : null

allow_major_version_upgrade = var.allow_major_version_upgrade
auto_minor_version_upgrade = var.auto_minor_version_upgrade
Expand Down Expand Up @@ -143,7 +143,7 @@ resource "aws_db_instance" "this_mssql" {
iops = var.iops
publicly_accessible = var.publicly_accessible
monitoring_interval = var.monitoring_interval
monitoring_role_arn = coalesce(var.monitoring_role_arn, aws_iam_role.enhanced_monitoring.*.arn, null)
monitoring_role_arn = var.monitoring_interval > 0 ? coalesce(var.monitoring_role_arn, aws_iam_role.enhanced_monitoring.*.arn, null) : null

allow_major_version_upgrade = var.allow_major_version_upgrade
auto_minor_version_upgrade = var.auto_minor_version_upgrade
Expand Down

0 comments on commit 470077e

Please sign in to comment.