We have a scenario where we would like to prompt the deployer with a question if a variable is in a specific state. I was looking for a step template that covers this but don’t see one, the closest I can find is the prompt variable of manual intervention step.
The use case is that we have steps for setting up stacks in AWS, our steps have the ability to delete stack which we use sparingly. However the concern is that we use a step to delete a stack, then some weeks later forget that the variable is set, update the process and deploy to production.
This scenario is shouldn’t happen as we would go up through the environments, but it would be good to have a safety net that if the delete variable is set that we can prompt the user to say “Are you sure you want to delete this stack xxxx ?”
Thanks for getting in touch! I have some thoughts here which should help you achieve what you are after.
I believe you can use a combination of Manual Intervention step alongside Variable Run Conditions.
The conditions documentation page has an example of how you can implement variables to decide whether a step should run or not. You can apply this to a Manual Intervention step to prompt/halt each deployment if a specific variable condition is or isn’t met.
This allows you to use any variable available to your deployment to decide whether the manual intervention step should run or not. You can use this to exit the deployment at the desired stage of the deployment if the conditions of the intervention are met.
Does this sound like it’s what you are after?
If you have any further questions here or run into any issues, please don’t hesitate to let me know.
#Edit: Fixed bad link
That’s what we need and have implemented it successfully - Thanks very much, as this will no doubt save an unintended delete in the long run!
Thanks for the update! I’m glad to hear this helped.
Feel free to get in touch at any time.