From 47084a2b98c9e6643fdb4953009b04c963477ca6 Mon Sep 17 00:00:00 2001 From: Balazs Novak-Bohak Date: Tue, 24 Oct 2023 17:22:30 +0200 Subject: [PATCH 1/3] Adding NDO descriptions to: template, EPG, BD --- ndo_schemas.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ndo_schemas.tf b/ndo_schemas.tf index 808d073..4ecd6dd 100644 --- a/ndo_schemas.tf +++ b/ndo_schemas.tf @@ -63,6 +63,7 @@ resource "mso_schema" "schema" { content { name = template.value.name display_name = template.value.name + description = try(template.description, "") tenant_id = var.manage_tenants ? mso_tenant.tenant[template.value.tenant].id : data.mso_tenant.template_tenant[template.value.tenant].id template_type = "aci_multi_site" } @@ -597,6 +598,7 @@ locals { template_name = template.name name = "${bd.name}${local.defaults.ndo.schemas.templates.bridge_domains.name_suffix}" display_name = "${bd.name}${local.defaults.ndo.schemas.templates.bridge_domains.name_suffix}" + description = try(bd.description, "") vrf_name = "${bd.vrf.name}${local.defaults.ndo.schemas.templates.vrfs.name_suffix}" vrf_schema_id = try(bd.vrf.schema, null) != null ? try(mso_schema.schema[bd.vrf.schema].id, data.mso_schema.template_schema[bd.vrf.schema].id) : null vrf_template_name = try(bd.vrf.template, null) @@ -623,6 +625,7 @@ resource "mso_schema_template_bd" "schema_template_bd" { template_name = each.value.template_name name = each.value.name display_name = each.value.display_name + description = each.value.description vrf_name = each.value.vrf_name vrf_schema_id = each.value.vrf_schema_id vrf_template_name = each.value.vrf_template_name @@ -852,6 +855,7 @@ locals { template_name = template.name anp_name = "${ap.name}${local.defaults.ndo.schemas.templates.application_profiles.name_suffix}" name = "${epg.name}${local.defaults.ndo.schemas.templates.application_profiles.endpoint_groups.name_suffix}" + description = try(epg.description, "") bd_name = try(epg.bridge_domain.name, null) != null ? "${epg.bridge_domain.name}${local.defaults.ndo.schemas.templates.bridge_domains.name_suffix}" : null bd_schema_id = try(epg.bridge_domain.schema, null) != null ? try(mso_schema.schema[epg.bridge_domain.schema].id, data.mso_schema.template_schema[epg.bridge_domain.schema].id) : null bd_template_name = try(epg.bridge_domain.template, null) @@ -882,6 +886,7 @@ resource "mso_schema_template_anp_epg" "schema_template_anp_epg" { anp_name = each.value.anp_name name = each.value.name display_name = each.value.name + description = each.value.description bd_name = each.value.bd_name bd_schema_id = each.value.bd_schema_id bd_template_name = each.value.bd_template_name From 69aeff2ea7ec69e131f2064e64530f5e9f9c3969 Mon Sep 17 00:00:00 2001 From: Balazs Novak-Bohak Date: Wed, 25 Oct 2023 10:22:44 +0200 Subject: [PATCH 2/3] Fixed issue with no description --- ndo_schemas.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ndo_schemas.tf b/ndo_schemas.tf index 4ecd6dd..a619598 100644 --- a/ndo_schemas.tf +++ b/ndo_schemas.tf @@ -63,7 +63,7 @@ resource "mso_schema" "schema" { content { name = template.value.name display_name = template.value.name - description = try(template.description, "") + description = try(template.description, null) tenant_id = var.manage_tenants ? mso_tenant.tenant[template.value.tenant].id : data.mso_tenant.template_tenant[template.value.tenant].id template_type = "aci_multi_site" } @@ -598,7 +598,7 @@ locals { template_name = template.name name = "${bd.name}${local.defaults.ndo.schemas.templates.bridge_domains.name_suffix}" display_name = "${bd.name}${local.defaults.ndo.schemas.templates.bridge_domains.name_suffix}" - description = try(bd.description, "") + description = try(bd.description, null) vrf_name = "${bd.vrf.name}${local.defaults.ndo.schemas.templates.vrfs.name_suffix}" vrf_schema_id = try(bd.vrf.schema, null) != null ? try(mso_schema.schema[bd.vrf.schema].id, data.mso_schema.template_schema[bd.vrf.schema].id) : null vrf_template_name = try(bd.vrf.template, null) @@ -855,7 +855,7 @@ locals { template_name = template.name anp_name = "${ap.name}${local.defaults.ndo.schemas.templates.application_profiles.name_suffix}" name = "${epg.name}${local.defaults.ndo.schemas.templates.application_profiles.endpoint_groups.name_suffix}" - description = try(epg.description, "") + description = try(epg.description, null) bd_name = try(epg.bridge_domain.name, null) != null ? "${epg.bridge_domain.name}${local.defaults.ndo.schemas.templates.bridge_domains.name_suffix}" : null bd_schema_id = try(epg.bridge_domain.schema, null) != null ? try(mso_schema.schema[epg.bridge_domain.schema].id, data.mso_schema.template_schema[epg.bridge_domain.schema].id) : null bd_template_name = try(epg.bridge_domain.template, null) From e376b7c9f331b02b862b734e00290d3a3a6aceac Mon Sep 17 00:00:00 2001 From: Balazs Novak-Bohak Date: Wed, 25 Oct 2023 11:31:43 +0200 Subject: [PATCH 3/3] Fixed template descr --- ndo_schemas.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndo_schemas.tf b/ndo_schemas.tf index a619598..5ac76d0 100644 --- a/ndo_schemas.tf +++ b/ndo_schemas.tf @@ -63,7 +63,7 @@ resource "mso_schema" "schema" { content { name = template.value.name display_name = template.value.name - description = try(template.description, null) + description = try(template.value.description, null) tenant_id = var.manage_tenants ? mso_tenant.tenant[template.value.tenant].id : data.mso_tenant.template_tenant[template.value.tenant].id template_type = "aci_multi_site" }