diff --git a/Makefile b/Makefile index 3fcf944..6b76584 100644 --- a/Makefile +++ b/Makefile @@ -31,13 +31,13 @@ test: fmt: nixfmt flake.nix yamlfmt \ - --exclude infra/.modules/cluster/roles/secrets/vars/main.yml \ + --exclude infra/_modules/cluster/roles/secrets/vars/main.yml \ --exclude infra/*/secrets.yaml \ . terragrunt hcl format - cd infra/.modules && tofu fmt -recursive + cd infra/_modules && tofu fmt -recursive cd controller && go fmt ./... - cd infra/.modules/tfstate && go fmt ./... + cd infra/_modules/tfstate && go fmt ./... cd test && go fmt ./... tidy: fmt diff --git a/infra/.modules/base/main.tf b/infra/_modules/base/main.tf similarity index 100% rename from infra/.modules/base/main.tf rename to infra/_modules/base/main.tf diff --git a/infra/.modules/base/outputs.tf b/infra/_modules/base/outputs.tf similarity index 100% rename from infra/.modules/base/outputs.tf rename to infra/_modules/base/outputs.tf diff --git a/infra/.modules/base/variables.tf b/infra/_modules/base/variables.tf similarity index 100% rename from infra/.modules/base/variables.tf rename to infra/_modules/base/variables.tf diff --git a/infra/.modules/bootstrap/argocd.tf b/infra/_modules/bootstrap/argocd.tf similarity index 100% rename from infra/.modules/bootstrap/argocd.tf rename to infra/_modules/bootstrap/argocd.tf diff --git a/infra/.modules/bootstrap/cert_manager.tf b/infra/_modules/bootstrap/cert_manager.tf similarity index 100% rename from infra/.modules/bootstrap/cert_manager.tf rename to infra/_modules/bootstrap/cert_manager.tf diff --git a/infra/.modules/bootstrap/ingress_nginx.tf b/infra/_modules/bootstrap/ingress_nginx.tf similarity index 100% rename from infra/.modules/bootstrap/ingress_nginx.tf rename to infra/_modules/bootstrap/ingress_nginx.tf diff --git a/infra/.modules/bootstrap/istio.tf b/infra/_modules/bootstrap/istio.tf similarity index 100% rename from infra/.modules/bootstrap/istio.tf rename to infra/_modules/bootstrap/istio.tf diff --git a/infra/.modules/bootstrap/locals.tf b/infra/_modules/bootstrap/locals.tf similarity index 100% rename from infra/.modules/bootstrap/locals.tf rename to infra/_modules/bootstrap/locals.tf diff --git a/infra/.modules/bootstrap/loki.tf b/infra/_modules/bootstrap/loki.tf similarity index 100% rename from infra/.modules/bootstrap/loki.tf rename to infra/_modules/bootstrap/loki.tf diff --git a/infra/.modules/bootstrap/platform.tf b/infra/_modules/bootstrap/platform.tf similarity index 100% rename from infra/.modules/bootstrap/platform.tf rename to infra/_modules/bootstrap/platform.tf diff --git a/infra/.modules/bootstrap/prometheus.tf b/infra/_modules/bootstrap/prometheus.tf similarity index 100% rename from infra/.modules/bootstrap/prometheus.tf rename to infra/_modules/bootstrap/prometheus.tf diff --git a/infra/.modules/bootstrap/registry.tf b/infra/_modules/bootstrap/registry.tf similarity index 100% rename from infra/.modules/bootstrap/registry.tf rename to infra/_modules/bootstrap/registry.tf diff --git a/infra/.modules/bootstrap/variables.tf b/infra/_modules/bootstrap/variables.tf similarity index 100% rename from infra/.modules/bootstrap/variables.tf rename to infra/_modules/bootstrap/variables.tf diff --git a/infra/.modules/bootstrap/vault-policies/allow_secrets.hcl b/infra/_modules/bootstrap/vault-policies/allow_secrets.hcl similarity index 100% rename from infra/.modules/bootstrap/vault-policies/allow_secrets.hcl rename to infra/_modules/bootstrap/vault-policies/allow_secrets.hcl diff --git a/infra/.modules/bootstrap/vault-test.yaml b/infra/_modules/bootstrap/vault-test.yaml similarity index 100% rename from infra/.modules/bootstrap/vault-test.yaml rename to infra/_modules/bootstrap/vault-test.yaml diff --git a/infra/.modules/bootstrap/vault.tf b/infra/_modules/bootstrap/vault.tf similarity index 100% rename from infra/.modules/bootstrap/vault.tf rename to infra/_modules/bootstrap/vault.tf diff --git a/infra/.modules/bootstrap/versions.tf b/infra/_modules/bootstrap/versions.tf similarity index 100% rename from infra/.modules/bootstrap/versions.tf rename to infra/_modules/bootstrap/versions.tf diff --git a/infra/.modules/cluster/group_vars/all.yml b/infra/_modules/cluster/group_vars/all.yml similarity index 100% rename from infra/.modules/cluster/group_vars/all.yml rename to infra/_modules/cluster/group_vars/all.yml diff --git a/infra/.modules/cluster/main.tf b/infra/_modules/cluster/main.tf similarity index 100% rename from infra/.modules/cluster/main.tf rename to infra/_modules/cluster/main.tf diff --git a/infra/.modules/cluster/main.yml b/infra/_modules/cluster/main.yml similarity index 100% rename from infra/.modules/cluster/main.yml rename to infra/_modules/cluster/main.yml diff --git a/infra/.modules/cluster/outputs.tf b/infra/_modules/cluster/outputs.tf similarity index 100% rename from infra/.modules/cluster/outputs.tf rename to infra/_modules/cluster/outputs.tf diff --git a/infra/.modules/cluster/roles/data/tasks/main.yml b/infra/_modules/cluster/roles/data/tasks/main.yml similarity index 100% rename from infra/.modules/cluster/roles/data/tasks/main.yml rename to infra/_modules/cluster/roles/data/tasks/main.yml diff --git a/infra/.modules/cluster/roles/k3s/defaults/main.yml b/infra/_modules/cluster/roles/k3s/defaults/main.yml similarity index 100% rename from infra/.modules/cluster/roles/k3s/defaults/main.yml rename to infra/_modules/cluster/roles/k3s/defaults/main.yml diff --git a/infra/.modules/cluster/roles/k3s/tasks/main.yml b/infra/_modules/cluster/roles/k3s/tasks/main.yml similarity index 100% rename from infra/.modules/cluster/roles/k3s/tasks/main.yml rename to infra/_modules/cluster/roles/k3s/tasks/main.yml diff --git a/infra/.modules/cluster/roles/k3s/templates/config.yaml.j2 b/infra/_modules/cluster/roles/k3s/templates/config.yaml.j2 similarity index 100% rename from infra/.modules/cluster/roles/k3s/templates/config.yaml.j2 rename to infra/_modules/cluster/roles/k3s/templates/config.yaml.j2 diff --git a/infra/.modules/cluster/roles/k3s/templates/k3s.service.j2 b/infra/_modules/cluster/roles/k3s/templates/k3s.service.j2 similarity index 100% rename from infra/.modules/cluster/roles/k3s/templates/k3s.service.j2 rename to infra/_modules/cluster/roles/k3s/templates/k3s.service.j2 diff --git a/infra/.modules/cluster/roles/k3s/templates/registries.yaml.j2 b/infra/_modules/cluster/roles/k3s/templates/registries.yaml.j2 similarity index 100% rename from infra/.modules/cluster/roles/k3s/templates/registries.yaml.j2 rename to infra/_modules/cluster/roles/k3s/templates/registries.yaml.j2 diff --git a/infra/.modules/cluster/roles/prerequisites/tasks/main.yml b/infra/_modules/cluster/roles/prerequisites/tasks/main.yml similarity index 100% rename from infra/.modules/cluster/roles/prerequisites/tasks/main.yml rename to infra/_modules/cluster/roles/prerequisites/tasks/main.yml diff --git a/infra/.modules/cluster/variables.tf b/infra/_modules/cluster/variables.tf similarity index 100% rename from infra/.modules/cluster/variables.tf rename to infra/_modules/cluster/variables.tf diff --git a/infra/.modules/hetzner-nixos/main.tf b/infra/_modules/hetzner-nixos/main.tf similarity index 100% rename from infra/.modules/hetzner-nixos/main.tf rename to infra/_modules/hetzner-nixos/main.tf diff --git a/infra/.modules/hetzner-nixos/outputs.tf b/infra/_modules/hetzner-nixos/outputs.tf similarity index 100% rename from infra/.modules/hetzner-nixos/outputs.tf rename to infra/_modules/hetzner-nixos/outputs.tf diff --git a/infra/.modules/hetzner-nixos/variables.tf b/infra/_modules/hetzner-nixos/variables.tf similarity index 100% rename from infra/.modules/hetzner-nixos/variables.tf rename to infra/_modules/hetzner-nixos/variables.tf diff --git a/infra/.modules/hetzner-nixos/versions.tf b/infra/_modules/hetzner-nixos/versions.tf similarity index 100% rename from infra/.modules/hetzner-nixos/versions.tf rename to infra/_modules/hetzner-nixos/versions.tf diff --git a/infra/.modules/instance/main.tf b/infra/_modules/instance/main.tf similarity index 100% rename from infra/.modules/instance/main.tf rename to infra/_modules/instance/main.tf diff --git a/infra/.modules/instance/outputs.tf b/infra/_modules/instance/outputs.tf similarity index 100% rename from infra/.modules/instance/outputs.tf rename to infra/_modules/instance/outputs.tf diff --git a/infra/.modules/instance/variables.tf b/infra/_modules/instance/variables.tf similarity index 100% rename from infra/.modules/instance/variables.tf rename to infra/_modules/instance/variables.tf diff --git a/infra/.modules/legacy/main.tf b/infra/_modules/legacy/main.tf similarity index 100% rename from infra/.modules/legacy/main.tf rename to infra/_modules/legacy/main.tf diff --git a/infra/.modules/legacy/outputs.tf b/infra/_modules/legacy/outputs.tf similarity index 100% rename from infra/.modules/legacy/outputs.tf rename to infra/_modules/legacy/outputs.tf diff --git a/infra/.modules/legacy/variables.tf b/infra/_modules/legacy/variables.tf similarity index 100% rename from infra/.modules/legacy/variables.tf rename to infra/_modules/legacy/variables.tf diff --git a/infra/.modules/legacy/versions.tf b/infra/_modules/legacy/versions.tf similarity index 100% rename from infra/.modules/legacy/versions.tf rename to infra/_modules/legacy/versions.tf diff --git a/infra/.modules/local-cluster/main.tf b/infra/_modules/local-cluster/main.tf similarity index 100% rename from infra/.modules/local-cluster/main.tf rename to infra/_modules/local-cluster/main.tf diff --git a/infra/.modules/local-cluster/outputs.tf b/infra/_modules/local-cluster/outputs.tf similarity index 100% rename from infra/.modules/local-cluster/outputs.tf rename to infra/_modules/local-cluster/outputs.tf diff --git a/infra/.modules/local-cluster/terraform.tf b/infra/_modules/local-cluster/terraform.tf similarity index 100% rename from infra/.modules/local-cluster/terraform.tf rename to infra/_modules/local-cluster/terraform.tf diff --git a/infra/.modules/local-cluster/variables.tf b/infra/_modules/local-cluster/variables.tf similarity index 100% rename from infra/.modules/local-cluster/variables.tf rename to infra/_modules/local-cluster/variables.tf diff --git a/infra/.modules/network/main.tf b/infra/_modules/network/main.tf similarity index 100% rename from infra/.modules/network/main.tf rename to infra/_modules/network/main.tf diff --git a/infra/.modules/network/outputs.tf b/infra/_modules/network/outputs.tf similarity index 100% rename from infra/.modules/network/outputs.tf rename to infra/_modules/network/outputs.tf diff --git a/infra/.modules/network/variables.tf b/infra/_modules/network/variables.tf similarity index 100% rename from infra/.modules/network/variables.tf rename to infra/_modules/network/variables.tf diff --git a/infra/.modules/nixos/configuration.nix b/infra/_modules/nixos/configuration.nix similarity index 100% rename from infra/.modules/nixos/configuration.nix rename to infra/_modules/nixos/configuration.nix diff --git a/infra/.modules/nixos/disks.nix b/infra/_modules/nixos/disks.nix similarity index 100% rename from infra/.modules/nixos/disks.nix rename to infra/_modules/nixos/disks.nix diff --git a/infra/.modules/nixos/flake.lock b/infra/_modules/nixos/flake.lock similarity index 100% rename from infra/.modules/nixos/flake.lock rename to infra/_modules/nixos/flake.lock diff --git a/infra/.modules/nixos/flake.nix b/infra/_modules/nixos/flake.nix similarity index 100% rename from infra/.modules/nixos/flake.nix rename to infra/_modules/nixos/flake.nix diff --git a/infra/.modules/nixos/profiles/k3s.nix b/infra/_modules/nixos/profiles/k3s.nix similarity index 100% rename from infra/.modules/nixos/profiles/k3s.nix rename to infra/_modules/nixos/profiles/k3s.nix diff --git a/infra/.modules/proxmox-nixos/main.tf b/infra/_modules/proxmox-nixos/main.tf similarity index 100% rename from infra/.modules/proxmox-nixos/main.tf rename to infra/_modules/proxmox-nixos/main.tf diff --git a/infra/.modules/proxmox-nixos/terraform.tf b/infra/_modules/proxmox-nixos/terraform.tf similarity index 100% rename from infra/.modules/proxmox-nixos/terraform.tf rename to infra/_modules/proxmox-nixos/terraform.tf diff --git a/infra/.modules/proxmox-nixos/variables.tf b/infra/_modules/proxmox-nixos/variables.tf similarity index 100% rename from infra/.modules/proxmox-nixos/variables.tf rename to infra/_modules/proxmox-nixos/variables.tf diff --git a/infra/.modules/secrets/main.tf b/infra/_modules/secrets/main.tf similarity index 100% rename from infra/.modules/secrets/main.tf rename to infra/_modules/secrets/main.tf diff --git a/infra/.modules/secrets/variables.tf b/infra/_modules/secrets/variables.tf similarity index 100% rename from infra/.modules/secrets/variables.tf rename to infra/_modules/secrets/variables.tf diff --git a/infra/.modules/secrets/versions.tf b/infra/_modules/secrets/versions.tf similarity index 100% rename from infra/.modules/secrets/versions.tf rename to infra/_modules/secrets/versions.tf diff --git a/infra/.modules/tfstate/go.mod b/infra/_modules/tfstate/go.mod similarity index 100% rename from infra/.modules/tfstate/go.mod rename to infra/_modules/tfstate/go.mod diff --git a/infra/.modules/tfstate/go.sum b/infra/_modules/tfstate/go.sum similarity index 100% rename from infra/.modules/tfstate/go.sum rename to infra/_modules/tfstate/go.sum diff --git a/infra/.modules/tfstate/main.go b/infra/_modules/tfstate/main.go similarity index 100% rename from infra/.modules/tfstate/main.go rename to infra/_modules/tfstate/main.go diff --git a/infra/local/bootstrap/terragrunt.hcl b/infra/local/bootstrap/terragrunt.hcl index 9629464..eca8e78 100644 --- a/infra/local/bootstrap/terragrunt.hcl +++ b/infra/local/bootstrap/terragrunt.hcl @@ -3,7 +3,7 @@ include "root" { } terraform { - source = "${find_in_parent_folders(".modules")}//bootstrap" + source = "${find_in_parent_folders("_modules")}//bootstrap" } dependency "cluster" { diff --git a/infra/local/cluster/terragrunt.hcl b/infra/local/cluster/terragrunt.hcl index 68a12d4..d7eaa6d 100644 --- a/infra/local/cluster/terragrunt.hcl +++ b/infra/local/cluster/terragrunt.hcl @@ -3,7 +3,7 @@ include "root" { } terraform { - source = "${find_in_parent_folders(".modules")}//local-cluster" + source = "${find_in_parent_folders("_modules")}//local-cluster" } inputs = { diff --git a/infra/production/hetzner/compute/terragrunt.hcl b/infra/production/hetzner/compute/terragrunt.hcl index 5435a25..bee7d21 100644 --- a/infra/production/hetzner/compute/terragrunt.hcl +++ b/infra/production/hetzner/compute/terragrunt.hcl @@ -1,5 +1,5 @@ terraform { - source = "${find_in_parent_folders(".modules")}//hetzner-nixos" + source = "${find_in_parent_folders("_modules")}//hetzner-nixos" } # TODO temp skip @@ -18,7 +18,7 @@ inputs = { # } } nixos = { - flake = "${find_in_parent_folders(".modules")}/nixos" + flake = "${find_in_parent_folders("_modules")}/nixos" host = "k3s" } } diff --git a/infra/production/oracle/bootstrap/terragrunt.hcl b/infra/production/oracle/bootstrap/terragrunt.hcl index 77c4c61..8d92f4c 100644 --- a/infra/production/oracle/bootstrap/terragrunt.hcl +++ b/infra/production/oracle/bootstrap/terragrunt.hcl @@ -3,7 +3,7 @@ include "root" { } terraform { - source = "${find_in_parent_folders(".modules")}//bootstrap" + source = "${find_in_parent_folders("_modules")}//bootstrap" } dependency "cluster" { diff --git a/infra/production/oracle/cluster/terragrunt.hcl b/infra/production/oracle/cluster/terragrunt.hcl index 4149361..8384e41 100644 --- a/infra/production/oracle/cluster/terragrunt.hcl +++ b/infra/production/oracle/cluster/terragrunt.hcl @@ -4,7 +4,7 @@ include "root" { } terraform { - source = "${find_in_parent_folders(".modules")}//cluster" + source = "${find_in_parent_folders("_modules")}//cluster" } dependency "legacy" { diff --git a/infra/production/oracle/legacy/terragrunt.hcl b/infra/production/oracle/legacy/terragrunt.hcl index 0dc6ce8..2a2aad2 100644 --- a/infra/production/oracle/legacy/terragrunt.hcl +++ b/infra/production/oracle/legacy/terragrunt.hcl @@ -4,7 +4,7 @@ include "root" { } terraform { - source = "${find_in_parent_folders(".modules")}//legacy" + source = "${find_in_parent_folders("_modules")}//legacy" } inputs = { diff --git a/infra/production/oracle/secrets/terragrunt.hcl b/infra/production/oracle/secrets/terragrunt.hcl index 72c1bf7..0785eff 100644 --- a/infra/production/oracle/secrets/terragrunt.hcl +++ b/infra/production/oracle/secrets/terragrunt.hcl @@ -4,7 +4,7 @@ include "root" { } terraform { - source = "${find_in_parent_folders(".modules")}//secrets" + source = "${find_in_parent_folders("_modules")}//secrets" } dependency "cluster" { diff --git a/infra/production/proxmox/compute/terragrunt.hcl b/infra/production/proxmox/compute/terragrunt.hcl index 54f57f1..0408cb3 100644 --- a/infra/production/proxmox/compute/terragrunt.hcl +++ b/infra/production/proxmox/compute/terragrunt.hcl @@ -4,13 +4,13 @@ include "root" { } terraform { - source = "${find_in_parent_folders(".modules")}//proxmox-nixos" + source = "${find_in_parent_folders("_modules")}//proxmox-nixos" } inputs = { name = "k3s" nixos = { - flake = "${find_in_parent_folders(".modules")}/nixos" + flake = "${find_in_parent_folders("_modules")}/nixos" host = "k3s" } cpu = { diff --git a/infra/production/tfstate/terragrunt.hcl b/infra/production/tfstate/terragrunt.hcl index 757dd28..29ee54a 100644 --- a/infra/production/tfstate/terragrunt.hcl +++ b/infra/production/tfstate/terragrunt.hcl @@ -4,7 +4,7 @@ include "root" { } terraform { - source = "${find_in_parent_folders(".modules")}//tfstate" + source = "${find_in_parent_folders("_modules")}//tfstate" before_hook "bootstrap_tfstate" { commands = ["init", "plan", "apply"]