Terraform Version
Terraform v1.5.0
DCNM version
Affected Resource(s)
- dcnm_network
- dcnm_vrf
likely other resources too.
Debug Output
Example output:
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: 400 Error : "Invalid VRF"
│
│ with module.vrfs_msd.dcnm_vrf.vrfs["VCF1"],
│ on ../modules/vrfs/main.tf line 18, in resource "dcnm_vrf" "vrfs":
│ 18: resource "dcnm_vrf" "vrfs" {
Expected Behavior
Upon the object not existing, and an invalid being returned by the read function, terraform should remove the object from its state and attempt a recreate.
Behavior
Process is removing a resource that is part of Terraform state, (such as network or VRF) from NDFC and re-running terraform plan or terraform apply
Important Factoids
This is likely the reason the plan errors out:
|
cont, err := getRemoteNetwork(dcnmClient, fabricName, dn) |
We might need a function similar to the one in the ACI provider to handle errors:
https://github.com/CiscoDevNet/terraform-provider-aci/blob/916fca71576a30b498a383de895d35340a2cd8a4/aci/utils.go#L414
Terraform Version
Terraform v1.5.0
DCNM version
Affected Resource(s)
likely other resources too.
Debug Output
Example output:
Expected Behavior
Upon the object not existing, and an invalid being returned by the read function, terraform should remove the object from its state and attempt a recreate.
Behavior
Process is removing a resource that is part of Terraform state, (such as network or VRF) from NDFC and re-running
terraform planorterraform applyImportant Factoids
This is likely the reason the plan errors out:
terraform-provider-dcnm/dcnm/resource_dcnm_network.go
Line 1170 in d0ff6c3
We might need a function similar to the one in the ACI provider to handle errors:
https://github.com/CiscoDevNet/terraform-provider-aci/blob/916fca71576a30b498a383de895d35340a2cd8a4/aci/utils.go#L414