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

Unable to reconcile deleted objects #128

Open
robvand opened this issue Aug 3, 2023 · 0 comments
Open

Unable to reconcile deleted objects #128

robvand opened this issue Aug 3, 2023 · 0 comments

Comments

@robvand
Copy link

robvand commented Aug 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant