Add instance_max_run_duration_seconds config
This pr adds a new instance_max_run_duration_seconds config field
that gets piped down into the builder instance's maxRunDuration
schedule. This will allow for an instance to automatically be stopped
or deleted, even if the packer build process is killed.
It also adds an instance_termination_action which must be set if
instance_max_run_duration_seconds config is set. This will tell GCP
to either STOP or DELETE the instance once the max duration has
been reached.
@nywilken - I saw you commenting on another PR. Is this something you can look at or pass off to someone that can?
My team is running packer in a github action and people will cancel the action sometimes while it is running, which doesn't give packer the opportunity to clean up instances correctly.
@nywilken - I saw you commenting on another PR. Is this something you can look at or pass off to someone that can?
My team is running packer in a github action and people will cancel the action sometimes while it is running, which doesn't give packer the opportunity to clean up instances correctly.
@phoenixuprising I’m no longer working on this project. But I’m cc’ing @lbajolet-hashicorp to help get eyes on the pull-request. Please be mindful that the team’s priority might be elsewhere at the moment. So he made need time to review and respond.
@lbajolet-hashicorp - Just wanted to check in and see if you could look over this PR. Thanks.
I apologize this has been lagging 🙃 I will clean up the rest of this and get it prepared for merging.