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

Update BD subnet configuration #28

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions defaults/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,18 @@ defaults:
subnets:
scope: private
shared: false
no_default_gateway: false
querier: false
primary: false
sites:
advertise_host_routes: false
mac: 00:22:BD:F8:19:FF
subnets:
scope: private
shared: false
no_default_gateway: false
querier: false
primary: false
filters:
name_suffix: ""
entries:
Expand Down
20 changes: 11 additions & 9 deletions ndo_schemas.tf
Original file line number Diff line number Diff line change
Expand Up @@ -695,11 +695,11 @@ locals {
template_name = template.name
bd_name = "${bd.name}${local.defaults.ndo.schemas.templates.bridge_domains.name_suffix}"
ip = subnet.ip
scope = try(subnet.scope, local.defaults.ndo.schemas.templates.bridge_domains.subnets.scope, "private")
scope = try(subnet.scope, local.defaults.ndo.schemas.templates.bridge_domains.subnets.scope)
shared = try(subnet.shared, local.defaults.ndo.schemas.templates.bridge_domains.subnets.shared)
no_default_gateway = try(subnet.no_default_gateway, local.defaults.ndo.schemas.templates.bridge_domains.subnets.no_default_gateway, false)
querier = try(subnet.querier, local.defaults.ndo.schemas.templates.bridge_domains.subnets.querier, "disabled")
primary = try(subnet.primary, local.defaults.ndo.schemas.templates.bridge_domains.subnets.primary, false) # Not yet implemented in provider
no_default_gateway = try(subnet.no_default_gateway, local.defaults.ndo.schemas.templates.bridge_domains.subnets.no_default_gateway)
querier = try(subnet.querier, local.defaults.ndo.schemas.templates.bridge_domains.subnets.querier)
primary = try(subnet.primary, local.defaults.ndo.schemas.templates.bridge_domains.subnets.primary)
}
]
]
Expand All @@ -717,6 +717,7 @@ resource "mso_schema_template_bd_subnet" "schema_template_bd_subnet" {
shared = each.value.shared
no_default_gateway = each.value.no_default_gateway
querier = each.value.querier
primary = each.value.primary

depends_on = [mso_schema_template_bd.schema_template_bd]
}
Expand All @@ -734,11 +735,11 @@ locals {
bd_name = "${bd.name}${local.defaults.ndo.schemas.templates.bridge_domains.name_suffix}"
site_id = var.manage_sites ? mso_site.site[site.name].id : data.mso_site.template_site[site.name].id
ip = subnet.ip
scope = try(subnet.scope, local.defaults.ndo.schemas.templates.bridge_domains.subnets.scope, "private")
shared = try(subnet.shared, local.defaults.ndo.schemas.templates.bridge_domains.subnets.shared)
no_default_gateway = try(subnet.no_default_gateway, local.defaults.ndo.schemas.templates.bridge_domains.subnets.no_default_gateway, false) # Not yet implemented in schema
querier = try(subnet.querier, local.defaults.ndo.schemas.templates.bridge_domains.subnets.querier)
primary = try(subnet.primary, local.defaults.ndo.schemas.templates.bridge_domains.subnets.primary, false) # Not yet implemented in provider
scope = try(subnet.scope, local.defaults.ndo.schemas.templates.bridge_domains.sites.subnets.scope)
shared = try(subnet.shared, local.defaults.ndo.schemas.templates.bridge_domains.sites.subnets.shared)
no_default_gateway = try(subnet.no_default_gateway, local.defaults.ndo.schemas.templates.bridge_domains.sites.subnets.no_default_gateway)
querier = try(subnet.querier, local.defaults.ndo.schemas.templates.bridge_domains.sites.subnets.querier)
primary = try(subnet.primary, local.defaults.ndo.schemas.templates.bridge_domains.sites.subnets.primary)
}
]
]
Expand All @@ -758,6 +759,7 @@ resource "mso_schema_site_bd_subnet" "schema_site_bd_subnet" {
shared = each.value.shared
no_default_gateway = each.value.no_default_gateway
querier = each.value.querier
primary = each.value.primary

depends_on = [mso_schema_site_bd.schema_site_bd]
}
Expand Down