Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support VRF and Networks using custom templates #111

Open
jgomezve opened this issue Nov 25, 2022 · 1 comment · May be fixed by #120 or #121
Open

Support VRF and Networks using custom templates #111

jgomezve opened this issue Nov 25, 2022 · 1 comment · May be fixed by #120 or #121
Labels
enhancement New feature or request

Comments

@jgomezve
Copy link

jgomezve commented Nov 25, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Support the creation of VRF/Networks using customized templates. As of now the providers only manages VRF/Networks using the NDFC/DCNM default templates

New or Affected Resource(s):

  • dcnm_vrf_custom
  • dcnm_network_custom

DCNM version

  • V 12.1.1e

Potential Terraform Configuration

resource "dcnm_vrf_custom" "my_vrf" {
  fabric             = "MyFabric"
  name               = "MyVRF"
  vlan_id            = 123
  segment_id         = 50016
  template           = "MyVRFTemplate"
  extension_template = "MyVRFExtensionTemplate"
  template_props = {
    "advertiseDefaultRouteFlag" : "true",
    "vrfVlanId" : 123,
    "isRPExternal" : "false",
    "borderMaxBgpPaths" : "6"
  }
  attachments {
    serial_number = "9EQ00OGQYV6"
    attach        = true
  }
}
@jgomezve jgomezve added the enhancement New feature or request label Nov 25, 2022
@jgomezve
Copy link
Author

jgomezve commented Nov 25, 2022

I had a look into the dcnm_vrf and dcnm_policy providers. It seems the dcnm_vrf provider is hard-coded to only work with the attributes required by the Default_VRF_Universal template.

Since this resource must work with any key-value pair to generate the attribute vrfTemplateConfig in the JSON Payload , it should be as flexible as possible. I was wondering if we could follow the same approach as in the resource dcnm_policy, where the the TF attribute template_props maps to a map[string]interface{} type, which is dynamic and works for any kind of policy. We could still re-use the same code of the dcnm_vrf resource to execute the attachment and the deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant