no10ds / rapid

Project rAPId
https://rapid.readthedocs.io/en/latest/
MIT License
23 stars 6 forks source link

Error after removing layers #62

Open Jarek-Rolski opened 11 months ago

Jarek-Rolski commented 11 months ago

After removing rapid layers with terraform module, rapid stops working. Problem is caused by permissions in terraform table to removed layers. Objects created here PermissionItem discover mismatch and raise error, that can be seen in ECS logs: CloudWatch2

TobyDrane commented 10 months ago

If you have data and permissions within rAPId for a previous setup that used to have layers and now those layers change within the rAPId setup you'll either have to write a custom migration script to move all the new data and permissions over into your new setup or remove everything and start from the new fresh rAPId setup.

When changing infrastructure it won't change any of the underlying data alongside it because this isn't the nature of the terraform. The errors above are failures in the Pydantic model validation because of the change of underlying infrastructure trying to match with the old data.

If this a situation you are going to be running into alot I would be happy to merge a custom migration you write into the project to handle this.