NOTICE: This module is under active development, the first fabric template to be included is the easy_fabric, additional templates will be added in the future.
A Terraform module to create and update a fabric in NDFC. Due to the structure of the NDFC API delete or destory operations are not permitted. The goal is to allow the creation of the fabric as part of a Infrastructure as Code workflow. Using a YAML document with the needed elements a fabric can be configured.
By providing a directory of YAML files that define the configurations for the fabric settings are merged with the defaults to simplify the definitions required. Users need only to define the fabric settings that they require and all other NDFC fabric template defaults are applied.
To see all available options the defaults for each fabric type are included in the defaults directory within the module repo rjohnston6/terraform-dcnm-ndfc-fabric. Only the options that deviate from the defaults need to be declared.
Example Directory structure for project
example/easy_fabric
├── data
│ └── fabric.yaml
├── example-directory-structure.md
├── main.tf
├── variables.tf
└── versions.tf
2 directories, 5 files
Configure a new Easy Fabric based fabric.
---
fabric:
BGP_AS: "65013"
GRFIELD_DEBUG_FLAG: "Enable"
module "easy_fabric" {
source = "rjohnston6/ndfc-fabric/dcnm"
yaml_directory = ["data"]
fabric_template = "easy_fabric"
fabric_name = "tf-fabric"
}
The module leverages efforts made by Daniel Schmidt and his Nexus-as-Code repo based for ACI netascode/terraform-aci-nac-aci. His work of using YAML as a data source and merging with default configurations streamlined and accelerated the capability to develop this NDFC module.
Name | Version |
---|---|
dcnm | 1.2.7 |
utils | 0.2.5 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
fabric_name | n/a | string |
n/a | yes |
fabric_template | Fabric Template Names, currently only easy_fabric supported others to be added | string |
"easy_fabric" |
no |
yaml_directory | n/a | list(string) |
[ |
no |
Name | Version |
---|---|
dcnm | 1.2.7 |
utils | 0.2.5 |
Name | Type |
---|---|
dcnm_rest.fabric | resource |
utils_yaml_merge.defaults | data source |
utils_yaml_merge.model | data source |