Skip to content

Commit

Permalink
Fix for issue when MonitoringRoleARN is required (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
flmmartins authored and antonbabenko committed Jan 7, 2020
1 parent 5538025 commit 8861bf2
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 @@ -52,7 +52,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, join("", aws_iam_role.enhanced_monitoring.*.arn))}"
monitoring_role_arn = "${var.monitoring_interval > 0 ? coalesce(var.monitoring_role_arn, join("", aws_iam_role.enhanced_monitoring.*.arn)) : "" }"

allow_major_version_upgrade = "${var.allow_major_version_upgrade}"
auto_minor_version_upgrade = "${var.auto_minor_version_upgrade}"
Expand Down Expand Up @@ -115,7 +115,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, join("", aws_iam_role.enhanced_monitoring.*.arn))}"
monitoring_role_arn = "${var.monitoring_interval > 0 ? coalesce(var.monitoring_role_arn, join("", aws_iam_role.enhanced_monitoring.*.arn)) : "" }"

allow_major_version_upgrade = "${var.allow_major_version_upgrade}"
auto_minor_version_upgrade = "${var.auto_minor_version_upgrade}"
Expand Down

0 comments on commit 8861bf2

Please sign in to comment.