Skip to content

Commit 31d4d85

Browse files
committed
additional check on data.oci_ons_notification_topic.oci_ons_notification_topic to ensure the datasource is created only if bastion is created.
Signed-off-by: Ali Mukadam <[email protected]>
1 parent aa30d29 commit 31d4d85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/bastion/datasources.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@ data "oci_core_instance" "bastion" {
6767
data "oci_ons_notification_topic" "bastion_notification" {
6868
#Required
6969
topic_id = oci_ons_notification_topic.bastion_notification[0].topic_id
70-
count = var.oci_bastion_notification.notification_enabled == true ? 1 : 0
70+
count = (var.oci_bastion.bastion_enabled == true && var.oci_bastion_notification.notification_enabled == true) ? 1 : 0
7171
}

0 commit comments

Comments
 (0)