fly-apps / terraform-provider-fly

Terraform provider for the Fly.io API
BSD 3-Clause "New" or "Revised" License
113 stars 37 forks source link

Error updating state after manually deleting certificate #98

Open ryansch opened 2 years ago

ryansch commented 2 years ago

Repro:

  1. Use the fly terraform provider to create a certificate via resource "fly_cert".
  2. Manually remove the certificate from fly.
  3. terraform plan
  4. Observe the following error.

Error: Could not find AppCertificate app.certificate

I was able to work around this by using terraform state rm.

DAlperin commented 2 years ago

@ryansch yeah that is a terraform thing more than an us thing. Modifying state outside of terraform is always bound to cause conflicts. I'll see if I can't make it spit out a better error message for this.

mootari commented 1 year ago

Shouldn't the resource get recreated in that case though, instead of just throwing an error?

(Related: https://github.com/fly-apps/terraform-provider-fly/issues/164)