diff --git a/terraform/.envrc b/terraform/.envrc new file mode 100644 index 0000000..e2f5eda --- /dev/null +++ b/terraform/.envrc @@ -0,0 +1,3 @@ +# OpenTofu CLI arguments +export TF_CLI_ARGS_plan="-parallelism=5" +export TF_CLI_ARGS_apply="-parallelism=5" diff --git a/terraform/dns_dnsimple_zones.tf b/terraform/dns_dnsimple_zones.tf index 3d150f0..e69de29 100644 --- a/terraform/dns_dnsimple_zones.tf +++ b/terraform/dns_dnsimple_zones.tf @@ -1,12 +0,0 @@ - -resource "dnsimple_zone" "gridmap_org" { - name = "gridmap.org" -} - -# resource "dnsimple_zone" "mcintire_me" { -# name = "mcintire.me" -# } - -resource "dnsimple_zone" "vntx_net" { - name = "vntx.net" -} diff --git a/terraform/dns_mcintire.tf b/terraform/dns_mcintire.tf index c1a8ec1..b21315a 100644 --- a/terraform/dns_mcintire.tf +++ b/terraform/dns_mcintire.tf @@ -7,32 +7,17 @@ resource "powerdns_record" "mcintire_soa" { records = ["ns1.as393837.net. graham.mcintire.me. 0 10800 3600 604800 3600"] } -# Mailcow MX records -resource "powerdns_record" "mcintire_mx_mailcow" { +# Mailcow MX records (primary and backup) +resource "powerdns_record" "mcintire_mx" { depends_on = [powerdns_zone.mcintire_me] zone = "mcintire.me." name = "mcintire.me." type = "MX" ttl = 3600 - records = ["10 mail.mcintire.me."] -} - -resource "powerdns_record" "mcintire_mx_backup" { - depends_on = [powerdns_zone.mcintire_me] - zone = "mcintire.me." - name = "mcintire.me." - type = "MX" - ttl = 3600 - records = ["20 mail.nsnw.ca."] -} - -resource "powerdns_record" "mcintire_cname_test" { - depends_on = [powerdns_zone.mcintire_me] - zone = "mcintire.me." - name = "*.test.mcintire.me." - type = "CNAME" - ttl = 14400 - records = ["cname.bookappt.link."] + records = [ + "10 mail.mcintire.me.", + "20 mail.nsnw.ca." + ] } # Mail server diff --git a/terraform/dns_reverse.tf b/terraform/dns_reverse.tf index 0ea867c..579d881 100644 --- a/terraform/dns_reverse.tf +++ b/terraform/dns_reverse.tf @@ -90,7 +90,7 @@ resource "powerdns_record" "ptr_records4" { for_each = { for i in range(256) : tostring(i) => { name = "${i}.191.110.204.in-addr.arpa." - record = tostring(i) == "5" ? "mail.w5isp.com." : "${i}.191.client.vntx.net." + record = tostring(i) == "5" ? "mail.mcintire.me." : "${i}.191.client.vntx.net." } } diff --git a/terraform/dns_vntx_net.tf b/terraform/dns_vntx_net.tf index 7e8c8c8..e0c16c0 100644 --- a/terraform/dns_vntx_net.tf +++ b/terraform/dns_vntx_net.tf @@ -1107,19 +1107,6 @@ resource "powerdns_record" "vntx_txt_records" { ttl = 3600 records = ["\"${each.value}\""] } - -# resource "powerdns_record" "vntx_srv1" { -# depends_on = [powerdns_zone.vntx_net] -# zone = "vntx.net." -# name = "_sipfederationtls._tcp.o365.vntx.net." -# type = "SRV" -# ttl = 3600 -# records = ["100 5061 sipfed.online.lync.com."] -# } - - -# SRV("_sip._tls.o365", 100, 1, 443, "sipdir.online.lync.com.", TTL(3600)), - resource "powerdns_record" "vntx_cname_records" { for_each = { "mte1._domainkey" = "dkim1.mandrillapp.com." diff --git a/terraform/terraform.tfvars.example b/terraform/terraform.tfvars.example deleted file mode 100644 index d5d459b..0000000 --- a/terraform/terraform.tfvars.example +++ /dev/null @@ -1,46 +0,0 @@ -# Copy this file to terraform.tfvars and fill in your values -# Or use environment variables: -# export TF_VAR_vultr_api_key="your_vultr_api_key" -# export TF_VAR_tailscale_key="your_tailscale_auth_key" -# export TF_VAR_proxmox_password="your_proxmox_password" - -# Vultr Configuration -vultr_api_key = "your_vultr_api_key_here" -tailscale_key = "your_tailscale_auth_key_here" - -# Proxmox Configuration -proxmox_api_url = "https://10.0.16.231:8006" -proxmox_user = "root@pam" -proxmox_password = "your_proxmox_password_here" -proxmox_tls_insecure = true - -# Proxmox node names -proxmox_nodes = ["lab02", "lab03", "lab04"] - -# Cluster configuration -cluster_name = "home-k3s" -vm_template = "debian-13-cloudinit" -storage_pool = "ceph" - -# Network configuration -network_bridge = "vmbr0" -network_cidr = "10.0.16.0/22" -network_gateway = "10.0.19.254" - -# Control plane configuration -control_plane_count = 3 -control_plane_cores = 2 -control_plane_memory = 8192 -control_plane_disk_size = 32 # GB -control_plane_ip_start = 868 # Will use 10.0.19.100, .101, .102 - -# Worker node configuration -worker_count = 3 -worker_cores = 4 -worker_memory = 8192 -worker_disk_size = 64 # GB -worker_ip_start = 878 # Will use 10.0.19.110, .111, .112 - -# SSH configuration -ssh_user = "debian" -ssh_public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHLyVSEEAEbGZZqwPwEup0XrlTpu3x3iF9ExvvQPA4xN graham@mcintire.me"