Compare commits

...

3 Commits

Author SHA1 Message Date
452ebb1ac0 Merge pull request 'Add DNS server configuration for Alpine Linux' (#16) from fix/alpine_dns into dev
Some checks failed
Terraform Deploy / Validate (push) Successful in 4s
Terraform Deploy / Apply (push) Has been cancelled
Terraform Deploy / Plan (push) Has been cancelled
Reviewed-on: #16
2026-06-10 07:15:26 +00:00
a5d1e2b817 Merge branch 'dev' into fix/alpine_dns
Some checks failed
Terraform PR / Validate (pull_request) Successful in 4s
Terraform PR / Plan (pull_request) Has been cancelled
2026-06-10 07:12:31 +00:00
Damien
41dae6a086 Add DNS server configuration for Alpine Linux
Some checks failed
Terraform PR / Validate (pull_request) Successful in 5s
Terraform PR / Plan (pull_request) Has been cancelled
2026-06-10 08:49:50 +02:00
2 changed files with 10 additions and 3 deletions

View File

@@ -15,10 +15,14 @@ users:
ssh_authorized_keys: ssh_authorized_keys:
- ${ssh_key} - ${ssh_key}
# 3. apk repositories configuration # 3. Base system files (DNS + apk repos, written before package_update)
# Pin the two repositories used on this homelab: edge/main + edge/community. # Alpine has no netplan/systemd-resolved, so we write resolv.conf ourselves.
# Written BEFORE package_update/package_upgrade so apk uses this config immediately.
write_files: write_files:
- path: /etc/resolv.conf
owner: root:root
permissions: '0644'
content: |
nameserver ${dns_server}
- path: /etc/apk/repositories - path: /etc/apk/repositories
owner: root:root owner: root:root
permissions: '0644' permissions: '0644'

View File

@@ -33,6 +33,9 @@ resource "proxmox_virtual_environment_file" "cloud_config" {
# VM information # VM information
hostname = "${each.key}.${var.domain_suffix}" hostname = "${each.key}.${var.domain_suffix}"
# Network (used by templates that need to write /etc/resolv.conf themselves, e.g. Alpine)
dns_server = var.dns_servers[0]
# Tailscale variables # Tailscale variables
vm_name = each.key vm_name = each.key
tailscale_auth_key = var.tailscale_auth_key tailscale_auth_key = var.tailscale_auth_key