From 40d8c2ddd0c5512c4c5d5017549ea292018c3a63 Mon Sep 17 00:00:00 2001 From: "mmaciejc@cisco.com" Date: Mon, 29 Apr 2024 11:05:02 +0200 Subject: [PATCH] fix - network_groups description --- fmc_objects.tf | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fmc_objects.tf b/fmc_objects.tf index fe38cf3..29e8fcd 100644 --- a/fmc_objects.tf +++ b/fmc_objects.tf @@ -177,7 +177,7 @@ locals { for object in try(domains.objects.network_groups, []) : { name = object.name - description = can(object.description) + description = try(object.description, local.defaults.fmc.domains.objects.network_groups.description, null) objects = try(object.objects, []) literals = try(object.literals, []) } if !contains(local.res_networkgroups_l1_hlp[domains.name][object.name], false) @@ -189,7 +189,7 @@ locals { for object in try(domains.objects.network_groups, []) : { name = object.name - description = can(object.description) + description = try(object.description, local.defaults.fmc.domains.objects.network_groups.description, null) objects = try(object.objects, []) literals = try(object.literals, []) } if !contains(keys(local.map_networkobjects_l2), object.name) && !contains(local.res_networkgroups_l2_hlp[domains.name][object.name], false) @@ -201,7 +201,7 @@ locals { for object in try(domains.objects.network_groups, []) : { name = object.name - description = can(object.description) + description = try(object.description, local.defaults.fmc.domains.objects.network_groups.description, null) objects = try(object.objects, []) literals = try(object.literals, []) } if !contains(keys(local.map_networkobjects_l3), object.name) && !contains(local.res_networkgroups_l3_hlp[domains.name][object.name], false) @@ -213,7 +213,7 @@ locals { for object in try(domains.objects.network_groups, []) : { name = object.name - description = can(object.description) + description = try(object.description, local.defaults.fmc.domains.objects.network_groups.description, null) objects = try(object.objects, []) literals = try(object.literals, []) } if !contains(keys(local.map_networkobjects_l4), object.name) && !contains(local.res_networkgroups_l4_hlp[domains.name][object.name], false) @@ -225,7 +225,7 @@ locals { for object in try(domains.objects.network_groups, []) : { name = object.name - description = can(object.description) + description = try(object.description, local.defaults.fmc.domains.objects.network_groups.description, null) objects = try(object.objects, []) literals = try(object.literals, []) } if !contains(keys(local.map_networkobjects_l5), object.name) && !contains(local.res_networkgroups_l5_hlp[domains.name][object.name], false) @@ -256,7 +256,7 @@ resource "fmc_network_group_objects" "networkgroup_l1" { } } # Optional - description = try(each.value.description, local.defaults.fmc.domains.objects.networkgroups.description, null) + description = each.value.description lifecycle { create_before_destroy = false @@ -287,7 +287,7 @@ resource "fmc_network_group_objects" "networkgroup_l2" { } } # Optional - description = try(each.value.description, local.defaults.fmc.domains.objects.networkgroups.description, null) + description = each.value.description depends_on = [ fmc_network_group_objects.networkgroup_l1 ] @@ -323,7 +323,7 @@ resource "fmc_network_group_objects" "networkgroup_l3" { } # Optional - description = try(each.value.description, local.defaults.fmc.domains.objects.networkgroups.description, null) + description = each.value.description depends_on = [ fmc_network_group_objects.networkgroup_l1, fmc_network_group_objects.networkgroup_l2 @@ -361,7 +361,7 @@ resource "fmc_network_group_objects" "networkgroup_l4" { } # Optional - description = try(each.value.description, local.defaults.fmc.domains.objects.networkgroups.description, null) + description = each.value.description depends_on = [ fmc_network_group_objects.networkgroup_l1, fmc_network_group_objects.networkgroup_l2, @@ -401,7 +401,7 @@ resource "fmc_network_group_objects" "networkgroup_l5" { } # Optional - description = try(each.value.description, local.defaults.fmc.domains.objects.networkgroups.description, null) + description = each.value.description depends_on = [ fmc_network_group_objects.networkgroup_l1, fmc_network_group_objects.networkgroup_l2,