Closed BenjaminDecreusefond closed 6 days ago
Hello @BenjaminDecreusefond I dont think that will be possible because when Terrakube is running the terraform plan here it takes the exit code of the operation.
Based on the exit code it updates the following flag
That is later used to run the script after the terraform plan.
In this validation
Hi @alfespa17 !
Ahh I see ! Is there a way to avoid this behavior ? Because not having error displayed from the drift check makes it kind of hard to manage many workspaces ? In this case, allowing the rest of the script to run is not an issue as we mainly want to return slack messages. Do you see a case where it would not be preferable to keep it running ?
Hi @alfespa17 !
Ahh I see ! Is there a way to avoid this behavior ? Because not having error displayed from the drift check makes it kind of hard to manage many workspaces ? In this casing allowing the rest of the script to run is not an issue as we mainly want to return slack messages. Do you see a case where it would not be preferable to keep it running ?
At least for now the is no way to keep the execution running, that will require some code change I guess
For now maybe you can create some script using the Api that validates the job status and create some message in slack
Ok, I'll try to propose you a PR and see if you're okay with it :)
Ok, I'll try to propose you a PR and see if you're okay with it :)
Sounds good
I think this was fixed by this
https://github.com/AzBuilder/terrakube/pull/1550
I am closing this issue
Feedback
Hi !
We would like to customise the default drift_detection provided on the Terrakube documentation. In its current state the template exec a plan and returns a slack message depending on the changes. However, if the plan fails for some reason the drift template returns nothing and we have no information about that. I see that the plan is triggered by the lines
But I wonder if this is a kind of shortcut for Terrakube itself ? Also, if the plan if failing during those lines the rest of the code will never execute and we have no options catch the error. Do you know if there's a way to bypass that behavior ?
Regards ! Benjamin