-
Regular users of Terraform will note that remote states are not being used. While this goes against best practice, this is intentional for the following reasons.
- As a personal homelab, this environment is primarily maintained by a single user.
- No cloud resources are being managed or configured by this repository.
- In the event a state file gets corrupted or goes missing, the state data can be re-imported into a new state file.
-
The
dmacvicar/libvirt
provider module is used to for KVM resources. -
The
carlpett/sops
provider module is used to decrypt data encrypted by SOPS with age.
The infrastructure directory contains all infrastructure configuration separated into distinct parts with their own states. This reduces the blast radius from a potential misconfiguration taking out all infrastructure at once.
The configuration contained within the infrastructure/hypervisors state configures KVM on the KVM Hypervisors and provides output data that can be used by other states.
cd infrastructure/hypervisors
terraform init
terraform apply
The configuration contained within the infrastructure/core_services state creates KVM VMs for usage as DNS servers. These are deployed to the KVM hypervisors configured in infrastructure/hypervisors.
cd infrastructure/core_services
terraform init
terraform apply
The configuration contained within the infrastructure/kubernetes state creates KVM VMs for usage as Kubernetes servers. These are deployed to the KVM hypervisors configured in infrastructure/hypervisors.
cd infrastructure/kubernetes
terraform init
terraform apply