Skip to content

Latest commit

 

History

History

minio

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

minio

Requirements

Name Version
terraform ~> 1.2
docker 3.0.2
random 3.6.0

Providers

Name Version
random 3.6.0

Modules

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

Resources

Name Type
random_password.minio_secret_key resource
random_string.minio_access_key resource

Inputs

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({
server_address = optional(string)
username = string
password = string
})
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({
test = list(string)
interval = optional(string, "0s")
timeout = optional(string, "0s")
retries = optional(number, 0)
start_period = optional(string, "0s")
})
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({
cores = optional(number)
memory = optional(number)
})
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({
global = optional(bool, false)
replicated = optional(object({
replicas = number
}), { replicas = 1 })
})
{
"global": false,
"replicated": {
"replicas": 1
}
}
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({
target = string
type = string
# bind_options conflict with volume, so we omit it from the input!
# bind_options = optional(object({ propagation = optional(string) }), null),
read_only = optional(bool, false)
source = optional(string)
tmpfs_options = optional(object({ mode = optional(number), size_bytes = optional(number) }), null)
volume_options = optional(object({ driver_name = optional(string), driver_options = optional(map(string)), labels = optional(map(string)), no_copy = optional(bool) }), {})
}))
[] 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({
cores = optional(number)
memory = optional(number)
generic_resources = optional(object({
discrete_resources_spec = optional(set(string))
named_resources_spec = optional(set(string))
}))
})
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({
condition = optional(string, "any")
delay = optional(string, "5s")
max_attempts = optional(number, 0)
window = optional(string, "5s")
})
{
"condition": "any",
"delay": "5s",
"max_attempts": 0,
"window": "5s"
}
no
secrets (Optional) The secrets to create with and add to the docker container. Creates docker secrets from non-terraform-resources.
set(object({
file_name = string
# secret_id = string # secret will be created and we take that resource id
file_gid = optional(string, "0")
file_mode = optional(number, 0444)
file_uid = optional(string, "0")
secret_name = optional(string, null)
secret_data = string
}))
[] no

Outputs

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