Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding NDO descriptions to: template, EPG, BD #22

Merged
merged 3 commits into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ndo_schemas.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ resource "mso_schema" "schema" {
content {
name = template.value.name
display_name = template.value.name
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"
}
Expand Down Expand Up @@ -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, 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)
Expand All @@ -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
Expand Down Expand Up @@ -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, 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)
Expand Down Expand Up @@ -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
Expand Down