Name | Version |
---|---|
terraform | ~> 1.2 |
docker | 3.0.2 |
random | 3.6.0 |
Name | Version |
---|---|
random | 3.6.0 |
Name | Source | Version |
---|---|---|
create_bucket | ../base_docker_service | n/a |
minio_docker_service | github.com/ehwplus/terraswarm//modules/base_docker_service | main |
minio_docker_volume | github.com/ehwplus/terraswarm//modules/base_docker_volume | main |
Name | Type |
---|---|
random_password.minio_secret_key | resource |
random_string.minio_access_key | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
args | (Optional) The arguments to pass to the docker image | list(string) |
[] |
no |
auth | (Optional) The authentication for a private docker registry. auth = { server_address = The address of the server for the authentication against a private docker registry. username = The password. password = The username. } |
object({ |
null |
no |
constraints | (Optional) The container placement constraints | set(string) |
[] |
no |
custom_image | The docker image name excluding the image tag | string |
null |
no |
env | (Optional) The environmental variables to pass to the docker image | map(string) |
null |
no |
healthcheck | healthcheck = { test = The test to be performed in CMD format. interval = Time between running the check (ms|s|m|h). Defaults to '0s'. timeout = Maximum time to allow one check to run (ms|s|m|h). Defaults to '0s'. retries = Consecutive failures needed to report unhealthy. Defaults to '0'. start_period = Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to '0s'. } |
object({ |
null |
no |
image_tag | (Optional) The image tag of the docker image. Defaults to: latest | string |
"latest" |
no |
labels | (Optional) Labels to add to the service and container | map(string) |
{} |
no |
limit | (Optional) The resources limit of service, memory unit is MB | object({ |
null |
no |
mode | (Optional) The service mode. Defaults to 'replicated' with replicas set to 1. type = { global = The global service mode. Defaults to 'false'. replicated = { replicas = The amount of replicas of the service. Defaults to '1'. } } |
object({ |
{ |
no |
mounts | (Optional) Mounts of this docker service. mounts = [{ target = Container path type = The mount type source = Mount source (e.g. a volume name, a host path) read_only = Whether the mount should be read-only tmpfs_options = { mode = The permission mode for the tmpfs mount in an integer size_bytes = The size for the tmpfs mount in bytes } volume_options = { driver_name = Name of the driver to use to create the volume driver_options = key/value map of driver specific options labels = [{ label = Name of the label value = Value of the label }] no_copy = Populate volume with data from the target. } }] |
set(object({ |
[] |
no |
name | The service name which must not be longer than 63 characters. This name will also be used as a network alias for all attached networks. | string |
n/a | yes |
namespace | (Optional) The namespace of Docker Swarm | string |
null |
no |
network_aliases | (Optional) Aliases (alternative hostnames) for this service on all specified networks. Other containers on the same network can use either the service name or this alias to connect to one of the service's containers. See https://docs.docker.com/compose/compose-file/compose-file-v3/#aliases for more information. | list(string) |
[] |
no |
networks | (Optional) The networks attached to this service | set(string) |
[] |
no |
reservation | (Optional) The resource reservation of service, memory unit is MB | object({ |
null |
no |
restart_policy | (Optional) Restart policy for containers. restart_policy = { condition = Condition for restart; possible options are "none" which does not automatically restart, "on-failure" restarts on non-zero exit, "any" (default) restarts regardless of exit status. delay = Delay between restart attempts (default is 5s) (ms|s|m|h). max_attempts = How many times to attempt to restart a container before giving up (default: 0, i.e. never give up). If the restart does not succeed within the configured window, this attempt doesn't count toward the configured max_attempts value. For example, if max_attempts is set to '2', and the restart fails on the first attempt, more than two restarts must be attempted. window = The time window used to evaluate the restart policy (default value is 5s, 0 means unbounded) (ms|s|m|h). } |
object({ |
{ |
no |
secrets | (Optional) The secrets to create with and add to the docker container. Creates docker secrets from non-terraform-resources. | set(object({ |
[] |
no |
Name | Description |
---|---|
access_key | The minio access_key string |
docker_volume | The docker_volume resource underlying minio |
minio_docker_service | The minio docker service |
network_alias | The default hostname which can be resolved within the attached networks |
secret_key | The minio secret_key string |
service_name | The minio docker service name |