fix: Add DNS server configuration support for internal hostname resolution
All checks were successful
Code Quality & Security Scan / TFLint (push) Successful in 18s
Code Quality & Security Scan / Terraform Destroy (push) Has been skipped
Code Quality & Security Scan / Tfsec Security Scan (push) Successful in 27s
Code Quality & Security Scan / Checkov Security Scan (push) Successful in 44s
Code Quality & Security Scan / Terraform Validate (push) Successful in 39s
Code Quality & Security Scan / SonarQube Scan (push) Successful in 37s
Code Quality & Security Scan / Terraform Plan (push) Successful in 1m24s
Code Quality & Security Scan / Terraform Apply (push) Successful in 1m31s
All checks were successful
Code Quality & Security Scan / TFLint (push) Successful in 18s
Code Quality & Security Scan / Terraform Destroy (push) Has been skipped
Code Quality & Security Scan / Tfsec Security Scan (push) Successful in 27s
Code Quality & Security Scan / Checkov Security Scan (push) Successful in 44s
Code Quality & Security Scan / Terraform Validate (push) Successful in 39s
Code Quality & Security Scan / SonarQube Scan (push) Successful in 37s
Code Quality & Security Scan / Terraform Plan (push) Successful in 1m24s
Code Quality & Security Scan / Terraform Apply (push) Successful in 1m31s
Added dns_servers variable to allow configuring custom DNS servers for the container to resolve internal hostnames. Changes: - Added dns_servers variable (list of strings, default empty) - Added dns configuration to docker_container resource in main.tf - Allows container to resolve internal domains like gitea.bsdserver.nl This fixes the ENOTFOUND DNS resolution error where the container couldn't resolve internal Gitea hostname, which was being reported as an "Authentication failure" but was actually a network/DNS issue. The error was: getaddrinfo ENOTFOUND gitea.bsdserver.nl Usage: dns_servers = ["192.168.x.x", "192.168.x.y"] If not specified (default), container uses Docker's default DNS.
This commit is contained in:
parent
57e03ed2db
commit
88f64911a7
3
main.tf
3
main.tf
@ -49,6 +49,9 @@ resource "docker_container" "renovate" {
|
|||||||
name = data.docker_network.traefik_network.name
|
name = data.docker_network.traefik_network.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# DNS configuration for internal hostname resolution
|
||||||
|
dns = var.dns_servers
|
||||||
|
|
||||||
# Volumes
|
# Volumes
|
||||||
volumes {
|
volumes {
|
||||||
volume_name = docker_volume.renovate_config.name
|
volume_name = docker_volume.renovate_config.name
|
||||||
|
|||||||
@ -51,6 +51,12 @@ variable "create_cname_record" {
|
|||||||
default = false
|
default = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "dns_servers" {
|
||||||
|
description = "List of DNS servers for the container to use for hostname resolution"
|
||||||
|
type = list(string)
|
||||||
|
default = []
|
||||||
|
}
|
||||||
|
|
||||||
# Renovate Platform Configuration
|
# Renovate Platform Configuration
|
||||||
|
|
||||||
variable "renovate_autodiscover" {
|
variable "renovate_autodiscover" {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user