feat: add ability to manually sync layers
@LucasMrqes If you create a TerraformRun directly that would be easier I think and should still work, you'd have to make sure there's no other TerraformRun running but apart from that it should be straightforward to implement plan/apply buttons
@LucasMrqes If you create a TerraformRun directly that would be easier I think and should still work, you'd have to make sure there's no other TerraformRun running but apart from that it should be straightforward to implement plan/apply buttons
I think using the controller to generate the run is a better way. I tried to create the run resource with the server and encountered the following issues:
- The status of the layer is not updated, thus making the layer status + run history incoherent and messing with how the server finds the last run in its /layers path. (unless we duplicate this logic in the server as well)
- Not using the controller to generate runs makes it complicated to debug using the manual sync Button, as the run creation logic is somewhat duplicated and the button would bypass the ususal flow of creating run/pods with Burrito
- Overall, the required logic is way more complicated
wdyt @Alan-pad ?
I think we can adapt the controller logic so the new runs are picked up
Implementing this feature with a tfrun creation requires us to rework the logic of the layer controller. This is something that we plan to do, but since this feature is requested a lot by Burrito users, we will merge this as is and work on a rework on future versions of Burrito.