published

Terraform ACI Tenant Module

Manages ACI Tenant
Location in GUI:
Tenants

Examples

Minimal Tenant config

module "aci_tenant" {
  source  = "qzx/tenant/aci"
  version = "1.0.0"

  tenant_name = "example"
}

Tenant config with VRFs, BDs, AP, EPG and static path mapping

module "aci_tenant" {
  source  = "qzx/tenant/aci"
  version = "1.0.0"

  tenant_name = "example"
  vrfs        = ["MY_VRF1", "MY_VRF2"]
  bridge_domains = {
    BD1 = {
      routing = true
      vrf     = "MY_VRF1"
    },
    BD2 = {
      routing = false
      vrf     = "MY_VRF2"
    }
  }
  application_profiles = ["ONE", "TWO"]
  epgs = {
    EPG1 = {
      name                = "EPG1"
      application_profile = "ONE"
      bridge_domain       = "BD1"
      domains             = ["uni/phys-MY_PHYSICAL_DOMAIN"]
      static_paths        = []
    },
    TWO-EPG2 = {
      name                = "EPG2"
      application_profile = "TWO"
      bridge_domain       = "BD2"
      domains             = ["uni/phys-MY_PHYSICAL_DOMAIN"]
      static_paths = [
        {
          vlan_id = 100
          path    = "topology/pod-1/protpaths-201-202/pathep-[MY_VPC_PATH_A]"
        },
        {
          vlan_id = 100
          path    = "topology/pod-1/protpaths-201-202/pathep-[MY_VPC_PATH_B]"
        }
      ]
    }
  }
}

Requirements

Name Version
terraform >= 1.0.0
aci ~> 0.7.0

Providers

Name Version
aci ~> 0.7.0

Inputs

Name Description Type Default Required
tenant_name The name of our new Tenant managed by Terraform string n/a yes
vrfs List of VRFs we want our new tenant to have set(string) [] no
bridge_domains Map of bridge domains to create and their associated VRFs
map(object({
routing = bool,
vrf = string,
}))
{} no
application_profiles List of application profiles belonging to the Tenant set(string) [] no
epgs Map of EPGs to create and their associated bridge-domains
map(object({
name = string,
application_profile = string,
bridge_domain = string,
domains = list(string),
static_paths = list(object({
path = string,
vlan_id = number,
})),
}))
{} no

Outputs

Name Description
epgs List of EPGs created
tenant_dn Name of the Tenant created
vrfs List of VRFs created

Resources

Name Type
aci_application_epg.this resource
aci_application_profile.this resource
aci_bridge_domain.this resource
aci_epg_to_domain.this resource
aci_epg_to_static_path.this resource
aci_tenant.this resource
aci_vrf.this resource
View code on GitHub

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.