Add healthcheck variables to support deploying non-custom docker containers #460
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ticket
N/A
Changes
service
child module:enable_healthcheck
healthcheck_path
healthcheck_type
healthcheck_start_period
Context for reviewers
I've used the
service
module a few times now to deploy open source solutions that we don't custom create. These docker images often need a little bit of massaging, but generally benefit from many of the same resources we use when deploying custom docker images. One thing that often needs to be altered are the ECS and ALB healthchecks. This PR adds the following terraform variables to theservice
child module to provide additional flexibility while allowing for our existing defaults.enable_healthcheck
: defaults totrue
. Setting tofalse
will disable healthchecks for the container in both ECS and ALBhealthcheck_path
: defaults to/health
. Allows root modules to set the healthcheck to another path depending on what the docker container provideshealthcheck_type
: defaults towget
. Allows for non-custom docker containers that come withcurl
built-in but notwget
healthcheck_start_period
: defaults to0
. Allows for setting a much longer grace period for non-custom docker containers that might take a long time to boot up.I've found this really useful, but I would like to hear whether this is helpful to include in the template.
Testing
I could use some assistance on how we want to write tests for this, if any.