https://github.com/numtide/terraform-linuxbox-traefik
https://github.com/numtide/terraform-linuxbox-traefik
terraform terraform-module
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/numtide/terraform-linuxbox-traefik
- Owner: numtide
- License: bsd-3-clause
- Created: 2020-09-16T20:59:44.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-07-26T09:34:20.000Z (almost 2 years ago)
- Last Synced: 2025-06-22T05:05:56.969Z (about 1 year ago)
- Topics: terraform, terraform-module
- Language: HCL
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 7
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Linuxbox Traefik Module
This module creates a [Traefik](https://docs.traefik.io/) ingress container.
Traefik is configured to pick up routing rules from the Docker container labels, and will infer the host names for the ACME TLS Certificate from those.
## Exposing a service using Traefik.
In order to create a service in Traefik, following labels must be present:
| Name | Value | Description |
|------|-------|-------------|
| `traefik.enable` | `true`| Tells Traefik to enable service to this container |
| `traefik.http.services..loadbalancer.server.port` | `80` | Container port to which the service will be routed |
| `traefik.http.routers..rule` | Host(`<hostname>`) && PathPrefix(`/`) | Defines which hostname and path prefix will be routed to the service. NOTE: please read Traefic doc on precedence or rules |
| `traefik.http.routers..tls.certresolver` | `module.traefik.certificate_resolver_name` | Defines which certificate resolver should be used to provide a TLS certificate for the route. This module will return it's resolver name in the output `certificate_resolver_name`