From 44f20ea8108c82eef254c5e031f59bbc21cf2992 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 30 Dec 2021 15:27:20 -0400 Subject: feat(wpcarro/diogenes): Support PTR record configuration This support reverse-DNS lookups. I encountered a problem where I accidentally deleted my instance's `nat_ip` (external, ephemeral IP). I needed to run... ```shell terraform apply -replace=google_compute_instance.diogenes ``` ...which invalidates terraform's local cache of the state. I believe this used to be called `terraform taint`. Things are mostly WAI, with one known issue: quasselcore and billandhiscomputer.com complain about missing SSL certs, but I believe this is a race-condition. Calling... ```shell systemctl restart quassel.service ``` ...resolves the issue for quassel. Unfortunately the same doesn't work for nginx.service, but after a bit of time https://billandhiscomputer.com "just works". Clearly I'm not sure what's going on here. At least not yet... Change-Id: I9f059655cb6e83d56618b77cfe4ed38283614ef6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4753 Tested-by: BuildkiteCI Reviewed-by: wpcarro Autosubmit: wpcarro --- users/wpcarro/nixos/diogenes/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'users/wpcarro/nixos') diff --git a/users/wpcarro/nixos/diogenes/default.nix b/users/wpcarro/nixos/diogenes/default.nix index b253dd3a24ad..b5fa822b7269 100644 --- a/users/wpcarro/nixos/diogenes/default.nix +++ b/users/wpcarro/nixos/diogenes/default.nix @@ -24,6 +24,12 @@ in wpcarro.terraform.googleCloudVM { managed_zone = "\${google_dns_managed_zone.${name}.name}"; rrdatas = ["\${google_compute_instance.${name}.network_interface[0].access_config[0].nat_ip}"]; }; + + resource.google_compute_instance."${name}" = { + network_interface.access_config = { + public_ptr_domain_name = domainName; + }; + }; }; configuration = { -- cgit 1.4.1