rjohnston6 / terraform-dcnm-ndfc-fabric

Terraform Module for NDFC Fabric Creation and Management

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terraform NDFC Fabric Module

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.

Usage

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.

Examples

New Easy Fabric

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.yaml'

---
fabric:
  BGP_AS: "65013"
  GRFIELD_DEBUG_FLAG: "Enable"

'main.tf'

module "easy_fabric" {
  source = "rjohnston6/ndfc-fabric/dcnm"

  yaml_directory  = ["data"]
  fabric_template = "easy_fabric"
  fabric_name     = "tf-fabric"

}

Acknowledgements

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.

Requirements

Name Version
dcnm 1.2.7
utils 0.2.5

Inputs

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)
[
"data"
]
no

Providers

Name Version
dcnm 1.2.7
utils 0.2.5

Resources

Name Type
dcnm_rest.fabric resource
utils_yaml_merge.defaults data source
utils_yaml_merge.model data source

About

Terraform Module for NDFC Fabric Creation and Management

License:Other


Languages

Language:HCL 100.0%