Skip to content

Latest commit

 

History

History

pgadmin

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

pgadmin

Requirements

Name Version
terraform ~> 1.2
docker 3.0.2

Providers

No providers.

Modules

Name Source Version
pgadmin_docker_service github.com/ehwplus/terraswarm//modules/base_docker_service?depth=1&ref=base_docker_service%2Fv0.1.0 n/a

Resources

No resources.

Inputs

Name Description Type Default Required
args (Optional) The arguments to pass to the docker image list(string) null 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
command (Optional) The command/entrypoint to be run in the image. According to the docker cli the override of the entrypoint is also passed to the command property and there is no entrypoint attribute in the ContainerSpec of the service. list(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 within 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
pgadmin_config_local (Optional) Contents of the config_local.py file to override pgAdmin configuration settings. string null no
pgadmin_config_servers (Optional) Contents of the servers.json file to pre-load server definitions. string null no
pgadmin_config_tls_cert (Optional) Contents of the server TLS certificate file. string null no
pgadmin_config_tls_key (Optional) Contents of the server TLS key file. string null no
pgadmin_default_email The default email address for PgAdmin string n/a yes
pgadmin_default_password The default password for PgAdmin string n/a yes
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
secret_map (Optional) Similar to the secrets variable but allows for docker secret creation from terraform resources.

secret_map = {
key = {
file_name = Represents the final filename in the filesystem.
secret_id = ID of the specific secret that we're referencing.
file_gid = Represents the file GID. Defaults to '0'.
file_mode = Represents represents the FileMode of the file. Defaults to '0o444'.
file_uid = Represents the file UID. Defaults to '0'.
secret_name = Name of the secret that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID.
}
}
map(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
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
service_port The external service port for PgAdmin number null no

Outputs

Name Description
this The PgAdmin docker service.