This repo contains a terraform provider for deploying networks on Cisco hardware via Cisco ACI.
In modern technology stacks developers and systems engineers find it easy to spin up new networks in the cloud using Terraform. This process is still challenging in more traditional data centers continues to be cumbersome. In recent years, Cisco has release the ACI technology to make the process of setting up and configuring networks simpler and faster. The ACI layer adds an Application Programmer's Interface (API) and a GUI for network engineers. This module aims to leverage the ACI capability and allow engineers to provision Cisco networks using Terraform.
More information on ACI capabilities can be found here.
Terraform is used to create, manage, and update infrastructure resources such as physical machines, VMs, network switches, containers, and more. Almost any infrastructure type can be represented as a resource in Terraform.
A provider is responsible for understanding API interactions and exposing resources.
Clone repository to: $GOPATH/src/github.com/ignw/terraform-provider-cisco-aci
$ mkdir -p $GOPATH/src/github.com/terraform-providers; cd $GOPATH/src/github.com/ignw/terraform-provider-cisco-aci
$ git clone [email protected]:terraform-providers/terraform-provider-aws
Enter the provider directory and build the provider
$ cd $GOPATH/src/github.com/ignw/terraform-provider-cisco-aci
$ make build
If you're building the provider, follow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init to initialize it.
If you wish to work on the provider, you'll first need Go installed on your machine (version 1.9+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin
to your $PATH
.
To compile the provider, run make build. This will build the provider and put the provider binary in the $GOPATH/bin
directory.
$ make build
...
$ $GOPATH/bin/terraform-provider-aws
...
In order to test the provider, you can simply run make test
.
Note: Make sure no AWS_ACCESS_KEY_ID
or AWS_SECRET_ACCESS_KEY
variables are set, and there's no [default]
section in the AWS credentials file ~/.aws/credentials
.
$ make test
In order to run the full suite of Acceptance tests, run make testacc
.
Note: Acceptance tests create real resources, and often cost money to run.
$ make testacc
``ACI_URL=https://host:port ACI_USER=admin ACI_PASS=password ACI_ALLOW_INSECURE make testacc
# Configure the Cisco ACI Provider
provider "aci" {
username = ""
password = ""
domain = ""
}
# Create a tenant
resource "aci_tenant" "enterprise" {
# ...
}
The ACI provider offers a flexible means of providing credentials for authentication. The following methods are supported, in this order, and explained below:
- Static credentials
- Environment variables
Environment variables
You can provide your credentials via the ACI_USERNAME
, ACI_PASSWORD
and ACI_DOMAIN
(optional) environment variables.
provider "aci" {}
Usage:
$ export ACI_USERNAME="someuser"
$ export ACI_PASSWORD="password"
$ export ACI_DOMAIN="mydomain.com"
$ terraform plan
This Module is maintained by IGNW. If you're looking for help or commercial support, send an email to [email protected]. IGNW can help with:
- Setup, customization, and support for this Provider.
- Modules for other types of infrastructure, such as VPCs, Docker clusters, databases, and continuous integration.
- Modules that meet compliance requirements, such as FedRamp, HIPAA.
- Consulting & Training on AWS, Azure, GCP, Terraform, and DevOps.
- Cisco Terraform Provider: The module includes Terraform code to interact with the Cisco ACI API.
This Module follows the principles of Semantic Versioning. You can find each new release, along with the changelog, in the Releases Page.
During initial development, the major version will be 0 (e.g., 0.x.y
), which indicates the code does not yet have a
stable API. Once we hit 1.0.0
, we will make every effort to maintain a backwards compatible API and use the MAJOR,
MINOR, and PATCH versions on each release to indicate any incompatibilities.
This code is released under the Mozilla . Please see LICENSE and NOTICE for more details.
Copyright © 2018 InfogroupNW, Inc.