CiscoDevNet / terraform-provider-dcnm

Cisco DCNM Provider
https://registry.terraform.io/providers/CiscoDevNet/dcnm/latest/docs
Mozilla Public License 2.0
8 stars 15 forks source link

Resource to configure a Fabric #113

Open jgomezve opened 1 year ago

jgomezve commented 1 year ago

Community Note

Description

Resource that manages the Fabric endpoint /appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/fabrics. It should be able to create, update and delete a Fabric based on a template

New or Affected Resource(s):

DCNM version

Potential Terraform Configuration

resource "dcnm_fabric" "my_fabric" {
  name          = "MyFabric"
  template_name = "Easy_Fabric"
  template_props = {
    "FABRIC_NAME" : "MyFabric",
    "BGP_AS" : "6500",
    "RR_COUNT" : "2",
    "ANYCAST_GW_MAC" : "2020.0000.00aa",
    "PM_ENABLE" : "false",
    "L2_SEGMENT_ID_RANGE" : "30000-49000",
    "L3_PARTITION_ID_RANGE" : "50000-59000",
    "NETWORK_VLAN_RANGE" : "2300-2999",
    "VRF_VLAN_RANGE" : "2000-2299",
  }
}
jgomezve commented 1 year ago

If I am not mistaken the Fabric endpoint supports all the CRUD operations. It is still open if upon Fabric deletion we should delete any switch associated with the Fabric.

As this resource requires an additional data struct I will create the respective PR in the Repo https://github.com/ciscoecosystem/dcnm-go-client.

You can reach out to me internally in Cisco Webex :)