Terraform Cloud ACI Tenant Module

published

Create and ACI Tenant for Cloud APIC in AWS User Account. When creating a new Tenant in Cisco Cloud APIC for AWS two items are required.

  1. The Tenant Name
  2. The AWS Account ID to associate the Tenant with.

When executing using Terraform this requires 2 resources to be defined to simplify further this simple module takes in the required variables and creates the new tenant.
Using this module one could manage multiple tenants as part of a terraform plan.

Cloud APIC Tenant Creation workflow (manual)

Accessed in GUI Application Management > Tenants > Actions >> Create Tenant

capic-tenant-ui

Example AWS Tenant Creation

Using the module creates the tenant with the supplied name and Account ID. The output provides the DN of the created tenant for use in additional modules or resources.

workflow-diagram

module "aws_aci_tenant" {
  source             = "rjohnston6/cloud-apic-tenant/aci"
  version            = "v0.1.0"
  tenant_name        = "terraform_tenant"
  tenant_description = "Created with Terraform" # Optional
  aws_account = {
    id         = "123456789012"
    is_trusted = "yes"
  }
}

Acknowledgements

Would like to acknowledge Marina Ferreira's repo marinalf/cloudaci-demo-terraform-aws. The work from this repo provides additional information on deploying components in Cloud ACI.

Requirements

Name Version
aci >=2.2.1

Providers

Name Version
aci >=2.2.1

Inputs

Name Description Type Default Required
tenant_name Name of managed tenant. string n/a yes
tenant_description Optional description for managed tenant. string null no
aws_account AWS Account ID to associate tenant with and trusted state (yes/no), see Cisco Cloud APIC User Guide for more details
object({
id = string
is_trusted = string
})
n/a yes

Outputs

Name Description
aci_tenant_dn Outputs the newly created Tenant ID for consumption in subsequent modules or resources

Resources

Name Type
aci_cloud_aws_provider.capic_aws_provider resource
aci_tenant.tenant 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.