OpenTofu configuration for personal infrastructure management.
-
Copy configuration template:
cp terraform.tfvars.sample terraform.tfvars
-
Update
terraform.tfvars
with your values -
Initialize and apply:
tofu init tofu plan tofu apply
- DNS: Cloudflare zones and automated record creation
- Networking: Tailscale mesh with device management
- Security: 1Password integration for secret management
- Storage: Backblaze B2 buckets for backup
- VMs: Oracle Cloud Infrastructure and Proxmox instances
- All credentials marked sensitive
- Network access via Tailscale zero-trust
- Secrets managed in 1Password
- State stored in Terraform Cloud
- OpenTofu 1.6+
- Access to cloud providers (Oracle Cloud, Cloudflare)
- 1Password service account
- Tailscale account
- Clone repository
- Copy
terraform.tfvars.sample
toterraform.tfvars
- Configure provider credentials in
terraform.tfvars
- Run initialization commands
Infrastructure defined in terraform.tfvars
:
routers = [
{
flags = ["homepage", "unifi"]
location = "au"
}
]
servers = [
{
flags = ["docker", "homepage"]
name = "server-name"
parent = "router-location"
}
]
vms_oci = [
{
config = {
cpus = 4
memory = 8
}
location = "au"
name = "vm-name"
}
]
vms_proxmox = [
{
config = {
cpus = 2
memory = 4
}
name = "vm-name"
parent = "physical-server-name"
}
]
tofu fmt && tofu validate && tofu plan
tofu apply
├── data.tf # All data sources
├── locals_*.tf # Configuration processing
├── outputs.tf # Output definitions
├── providers.tf # Provider configurations
├── terraform.tf # Terraform configuration
├── variables.tf # Variable definitions
├── *.tf # Resource files
└── terraform.tfvars # Instance values
Common issues:
- Authentication errors: Check
terraform.tfvars
credentials - DNS delays: Cloudflare changes take time to propagate
- Resource conflicts: Check for naming collisions
- VM failures: Verify cloud provider quotas
Run tofu validate
to check configuration syntax.
- Follow the coding standards in
CLAUDE.md
- Run
tofu fmt
before committing - Ensure all changes pass
tofu validate
andtofu plan
- Use the provided commit message format
This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.