infra: add flake module and crocus exports

This commit is contained in:
2025-11-24 17:11:04 +01:00
parent 925cf3140c
commit 5f6ba8e29d
4 changed files with 28 additions and 0 deletions

View File

@@ -62,3 +62,7 @@ resource "hcloud_firewall" "crocus_firewall" {
source_ips = ["0.0.0.0/0", "::/0"]
}
}
output "crocus_ipv4" {
value = hcloud_primary_ip.crocus_ipv4.ip_address
}

18
infra/flake-module.nix Normal file
View File

@@ -0,0 +1,18 @@
{
flake.infra =
let
tf_outputs = builtins.fromJSON (builtins.readFile ../infra/outputs.json);
in
{
machines = {
verbena = {
ipv4 = tf_outputs.verbena_ipv4.value;
ipv6 = tf_outputs.verbena_ipv6.value;
gateway6 = tf_outputs.verbena_gateway6.value;
};
crocus = {
ipv4 = tf_outputs.crocus_ipv4.value;
};
};
};
}

View File

@@ -1,4 +1,9 @@
{
"crocus_ipv4": {
"sensitive": false,
"type": "string",
"value": "116.203.18.122"
},
"verbena_gateway6": {
"sensitive": false,
"type": "string",