fly-apps / terraform-provider-fly

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

Deleting fly_app deletes everything, other resources left in state but can't delete #163

Open OJFord opened 1 year ago

OJFord commented 1 year ago

Say you change the name of a fly_app, which forces a replacement of the IP, machine, everything - they'll race to delete and anything the fly_app beats won't be able to delete, as it will now get a 404. (Without checking, I assume the API is something like /apps/:id/machines/:id).

If it already doesn't exist (either app or machine), delete should just succeed, remove from state. There's no need to alert that the app doesn't exist, it must be correct, since it was checked on create/import when we added it to the state.