mercari / terraform-provider-spinnaker

A Spinnaker provider for Terraform
https://registry.terraform.io/providers/mercari/spinnaker/latest
MIT License
13 stars 6 forks source link

Bug when pipeline is deleted in UI: "Error: NoSuchEntityException" #155

Open max-rocket-internet opened 2 years ago

max-rocket-internet commented 2 years ago

When I run terraform:

$ terraform apply
module.locust_pipeline.null_resource.render_pipeline: Refreshing state... [id=4622595260021803334]
module.locust_pipeline.spinnaker_pipeline.locust: Refreshing state... [id=110bac63-4bc2-4de6-86a2-067c0d156960]
spinnaker_pipeline.load_test["dms"]: Refreshing state... [id=230a5a70-290e-4e28-8f12-acf5969b116f]
spinnaker_pipeline.load_test["mas"]: Refreshing state... [id=0fd3373e-29d7-4a57-86e8-4b9f92eb6ca9]
spinnaker_pipeline.load_test["dps"]: Refreshing state... [id=380d199b-3425-4d26-8771-98856a6ad15b]
...
spinnaker_pipeline.load_test["opa-oma-cs"]: Refreshing state... [id=863e7992-e58e-49e6-a7f8-c45c20083c1f]

Error: NoSuchEntityException

Any idea how to fix this? Normally terraform would just recreate the resource.

To fix this you need to remove the pipeline from the state: terraform state rm module.locust_pipeline.spinnaker_pipeline.locust

max-rocket-internet commented 2 years ago

I reported it here also but it seems the original repo is not maintained any more: https://github.com/armory-io/terraform-provider-spinnaker/issues/57

himanhsugusain commented 3 weeks ago

You should be able to run terraform refresh to do this automatically before you run apply