diff --git a/modules/zitadel/README.md b/modules/zitadel/README.md index 6c7481a..e64e692 100644 --- a/modules/zitadel/README.md +++ b/modules/zitadel/README.md @@ -57,7 +57,7 @@ Secure authentication management for your application. Customize as you grow, wi | [network\_aliases](#input\_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](#input\_networks) | (Optional) The networks attached to this service | `set(string)` | `[]` | no | | [ports](#input\_ports) | (Optional) The ports to expose on the swarm for the service.

ports = [{
target\_port = The port inside the container.
name = A random name for the port.
protocol = Represents the protocol of a port: tcp, udp or sctp. Defaults to 'tcp'.
publish\_mode = Represents the mode in which the port is to be published: 'ingress' or 'host'. Defaults to 'ingress'.
published\_port = The port on the swarm hosts.
}] |
list(object({
target_port = number,
name = optional(string),
protocol = optional(string, "tcp"),
publish_mode = optional(string, "ingress")
published_port = optional(number),
}))
| `[]` | no | -| [postgresql](#input\_postgresql) | Configuration for the PostgreSQL service to be used with Zitadel.

- custom\_image: (Optional) The docker image name excluding the image tag.
- image\_tag: (Optional) The image tag of the docker image. Defaults to: latest.
- args: (Optional) The arguments to pass to the docker image.
- env: (Optional) The environmental variables to pass to the docker image.
- mounts: (Optional) Mounts of this docker service.
- labels: (Optional) Labels to add to the service and container.
- constraints: (Optional) The container placement constraints.
- limit: (Optional) The resources limit of service, memory unit is MB.
- reservation: (Optional) The resource reservation of service, memory unit is MB.
- restart\_policy: (Optional) Restart policy for containers.
- auth: (Optional) The authentication for a private docker registry.
- healthcheck: (Optional) Healthcheck configuration for the container.
- postgres\_volume\_options: The PostgreSQL data volume driver with its options. |
object({
custom_image = optional(string, null)
image_tag = optional(string, "latest")
args = optional(list(string), null)
env = optional(map(string), null)
mounts = optional(set(object({
target = string
type = string
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)
}), {})
})), [])
labels = optional(map(string), {})
constraints = optional(set(string), [])
limit = optional(object({
cores = optional(number)
memory = optional(number)
}), null)
reservation = optional(object({
cores = optional(number)
memory = optional(number)
generic_resources = optional(object({
discrete_resources_spec = optional(set(string))
named_resources_spec = optional(set(string))
}))
}), null)
restart_policy = optional(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"
})
auth = optional(object({
server_address = optional(string)
username = string
password = string
}), null)
healthcheck = optional(object({
test = list(string)
interval = optional(string, "0s")
timeout = optional(string, "0s")
retries = optional(number, 0)
start_period = optional(string, "0s")
}), null)
postgres_volume_options = optional(object({
driver_name = optional(string)
driver_options = optional(map(string))
labels = optional(map(string))
no_copy = optional(bool)
}), {})
})
|
{
"args": null,
"auth": null,
"constraints": [],
"custom_image": null,
"env": null,
"healthcheck": null,
"image_tag": "latest",
"labels": {},
"limit": null,
"mounts": [],
"postgres_volume_options": {
"driver_name": "local",
"driver_options": {},
"labels": {}
},
"reservation": null,
"restart_policy": {
"condition": "any",
"delay": "5s",
"max_attempts": 0,
"window": "5s"
}
}
| no | +| [postgresql](#input\_postgresql) | Configuration for the PostgreSQL service to be used with Zitadel.

- custom\_image: (Optional) The docker image name excluding the image tag.
- image\_tag: (Optional) The image tag of the docker image. Defaults to: latest.
- args: (Optional) The arguments to pass to the docker image.
- env: (Optional) The environmental variables to pass to the docker image.
- mounts: (Optional) Mounts of this docker service.
- labels: (Optional) Labels to add to the service and container.
- constraints: (Optional) The container placement constraints.
- limit: (Optional) The resources limit of service, memory unit is MB.
- reservation: (Optional) The resource reservation of service, memory unit is MB.
- restart\_policy: (Optional) Restart policy for containers.
- auth: (Optional) The authentication for a private docker registry.
- healthcheck: (Optional) Healthcheck configuration for the container.
- postgres\_volume\_options (Optional): The PostgreSQL data volume driver with its options. |
object({
custom_image = optional(string, null)
image_tag = optional(string, "latest")
args = optional(list(string), null)
env = optional(map(string), null)
mounts = optional(set(object({
target = string
type = string
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)
}), {})
})), [])
labels = optional(map(string), {})
constraints = optional(set(string), [])
limit = optional(object({
cores = optional(number)
memory = optional(number)
}), null)
reservation = optional(object({
cores = optional(number)
memory = optional(number)
generic_resources = optional(object({
discrete_resources_spec = optional(set(string))
named_resources_spec = optional(set(string))
}))
}), null)
restart_policy = optional(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"
})
auth = optional(object({
server_address = optional(string)
username = string
password = string
}), null)
healthcheck = optional(object({
test = list(string)
interval = optional(string, "0s")
timeout = optional(string, "0s")
retries = optional(number, 0)
start_period = optional(string, "0s")
}), null)
postgres_volume_options = optional(object({
driver_name = optional(string)
driver_options = optional(map(string))
labels = optional(map(string))
no_copy = optional(bool)
}), {})
})
|
{
"args": null,
"auth": null,
"constraints": [],
"custom_image": null,
"env": null,
"healthcheck": null,
"image_tag": "latest",
"labels": {},
"limit": null,
"mounts": [],
"postgres_volume_options": {
"driver_name": "local",
"driver_options": {},
"labels": {}
},
"reservation": null,
"restart_policy": {
"condition": "any",
"delay": "5s",
"max_attempts": 0,
"window": "5s"
}
}
| no | | [reservation](#input\_reservation) | (Optional) The resource reservation for the Zitadel 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](#input\_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](#input\_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 | diff --git a/modules/zitadel/variables.tf b/modules/zitadel/variables.tf index aea33be..1054ea1 100644 --- a/modules/zitadel/variables.tf +++ b/modules/zitadel/variables.tf @@ -492,7 +492,7 @@ variable "postgresql" { - restart_policy: (Optional) Restart policy for containers. - auth: (Optional) The authentication for a private docker registry. - healthcheck: (Optional) Healthcheck configuration for the container. - - postgres_volume_options: The PostgreSQL data volume driver with its options. + - postgres_volume_options (Optional): The PostgreSQL data volume driver with its options. EOT default = { custom_image = null