Skip to content

Unable to reconcile deleted objects #128

@robvand

Description

@robvand

Terraform Version

Terraform v1.5.0

DCNM version

  • V 12.1.2e

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions