From 9d22e9b8104cd4777ee21b864e0fb263020baca1 Mon Sep 17 00:00:00 2001 From: Andrei Ilas Date: Fri, 5 Apr 2024 15:36:15 +0300 Subject: [PATCH] create OKE VCN DRG attachment when existing DRG is specified --- module-network.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module-network.tf b/module-network.tf index 5543057a..c7fa8eb2 100644 --- a/module-network.tf +++ b/module-network.tf @@ -86,7 +86,7 @@ module "drg" { drg_id = one([var.drg_id]) # existing DRG ID or null drg_display_name = coalesce(var.drg_display_name, "oke-${local.state_id}") - drg_vcn_attachments = tobool(var.create_drg) ? { for k, v in module.vcn : k => { + drg_vcn_attachments = tobool(var.create_drg) || var.drg_id != null ? { for k, v in module.vcn : k => { # gets the vcn_id values dynamically from the vcn module vcn_id : v.vcn_id vcn_transit_routing_rt_id : null