CiscoDevNet / terraform-provider-dcnm

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

network creation failed on MSD #63

Closed dsx1123 closed 2 years ago

dsx1123 commented 2 years ago

Community Note

Terraform Version

Terraform v1.1.3
on linux_amd64
+ provider registry.terraform.io/ciscodevnet/dcnm v1.1.0

Your version of Terraform is out of date! The latest version
is 1.1.4. You can update by downloading from https://www.terraform.io/downloads.html

NDFC version

Affected Resource(s)

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp
terraform {
  required_providers {
    dcnm = {
      source  = "CiscoDevNet/dcnm"
      version = "1.1.0"
    }
  }
}

data "dcnm_inventory" "fabric1_leaf1" {
  fabric_name = "fabric1"
  switch_name = "93240YC-FX2-L1-S1"
}

data "dcnm_inventory" "fabric2_leaf1" {
  fabric_name = "fabric2"
  switch_name = "93240YC-FX2-L1-S2"
}

provider "dcnm" {
  username = var.dcnm_username
  password = var.dcnm_password
  url      = "https://172.25.74.47"
  platform = "nd"
}

resource "dcnm_network" "networks" {
  fabric_name  = "MSD"
  name         = "MSD_test"
  network_id   = "31000"
  vlan_id      = "1000"
  vlan_name    = "MSD_test"
  description  = "create from terraform"
  vrf_name     = "BLUE-TF"
  ipv4_gateway = "1.1.1.1/24"

  deploy = true
  attachments {
    serial_number = data.dcnm_inventory.fabric1_leaf1.serial_number
    attach        = true
    switch_ports  = []
  }
  attachments {
    serial_number = data.dcnm_inventory.fabric2_leaf1.serial_number
    attach        = true
    switch_ports  = []
  }
}

Debug Output

https://gist.github.com/dsx1123/022028a0d7f8b460c82ef9656012ceb0

Panic Output

Expected Behavior

network should be created

Actual Behavior

dcnm_network.networks: Creating...
╷
│ Error: 400 Error : "Invalid Mulicast Group Addressnull"
│
│   with dcnm_network.networks,
│   on main.tf line 28, in resource "dcnm_network" "networks":
│   28: resource "dcnm_network" "networks" {
│

Steps to Reproduce

  1. terraform apply

Important Factoids

References

YazhRajesh commented 2 years ago

Hi, I'm getting the following error when I try to deploy a MSD network on DCNM. NDFC works fine. 400 Error : "Invalid Fabric"

I'm adding my code below as well as the output log file.

terraform{
  required_providers {
  dcnm = {
    source = "ciscodevnet/dcnm"
          }
    }
}
provider "dcnm" {
  username = "admin"
  password = "ins3965!"
  url      = "https://172.25.74.71"
  insecure = true
  platform = "dcnm"
  # expiry   = 900000
}

data "dcnm_inventory" "fabric1_leaf1" {
  fabric_name = "fabric1"
  switch_name = "93240YC-FX2-L1-S1"
}

data "dcnm_inventory" "fabric2_leaf1" {
  fabric_name = "fabric2"
  switch_name = "93240YC-FX2-L1-S2"
}

resource "dcnm_network" "dcnmnetwork" {
  fabric_name  = "MSDtest"
  name         = "MSDTestNetwork"
  network_id   = "31000"
  vlan_id      = "1000"
  vlan_name    = "MSD_test"
  description  = "create from terraform"
  vrf_name     = "MyVRF_50000"
  ipv4_gateway = "1.1.1.3/24"

  deploy = true
  attachments {
    serial_number = data.dcnm_inventory.fabric1_leaf1.serial_number
    attach        = true
    switch_ports  = []
  }
  attachments {
    serial_number = data.dcnm_inventory.fabric2_leaf1.serial_number
    attach        = true
    switch_ports  = []
  }
}

output.txt

YazhRajesh commented 2 years ago

MSD is working on both DCNM and NDFC after running terraform destroy and rebuilding it.