OpenTofu infrastructure for OCI Always Free tier — provisions 4× Ampere A1.Flex (ARM64) + 1× Micro instance.
Supports two modes via the omni_ready toggle:
| Mode | omni_ready |
OS | Kubernetes |
|---|---|---|---|
| Default | false |
Ubuntu (custom image) | Bring your own |
| Talos + Omni | true |
Talos Linux | Enrolled into Omni via SideroLink |
tofu/oci/ OpenTofu module — instances, networking, budget
scripts/ Helper scripts (state backend, capacity check)
- OCI account (PAYG recommended for Ampere availability)
- OCI CLI configured (
~/.oci/config) - OpenTofu ≥ 1.8
cp tofu/oci/terraform.tfvars.example tofu/oci/terraform.tfvars
# Edit terraform.tfvars — set compartment OCID, SSH key, image OCIDsKey variables:
# Default (Ubuntu)
omni_ready = false
# Talos + Omni enrollment
omni_ready = true
talos_image_ocid = "ocid1.image.oc1..." # auto-fetched from oci-talos-gitops-apps in CI
omni_endpoint = "omni.example.com:8090"
omni_join_token = "..." # or pass via -var / TF_VAR_omni_join_tokencd tofu/oci
tofu init
tofu plan
tofu applyWhen omni_ready = true:
- Nodes boot Talos Linux (custom OCI image from oci-free-tier-images)
user_datainjects a Talos MachineConfig that joins Omni via SideroLink- Omni detects the nodes and provisions the cluster
- Argo CD GitOps is managed by oci-talos-gitops-apps
- Ampere A1: 4 OCPUs + 24 GB RAM total (ARM64, flexible — split across up to 4 instances)
- E2.1.Micro: 2 instances × 1/8 OCPU + 1 GB RAM (AMD)
- Block volumes: 200 GB total (includes all boot volumes)
- Object storage: 20 GB
- VCNs: 2
- Load balancer: 1 (10 Mbps)
- Egress: 10 TB/month
Normal — Ampere instances are highly contested. The CI deploy workflow retries automatically. For manual deployments:
- Re-run
tofu apply— OCI eventually allocates capacity - Try a different availability domain within the same region
- Try off-peak hours
200 GB includes all boot volumes. Example allocations:
- 4× Ampere at 47 GB = 188 GB (leaves 12 GB)
- 3× Ampere + 1× Micro at 50 GB = 200 GB (maxed)
- oci-free-tier-images — Custom OS images (Talos, Debian) built for OCI import
- oci-talos-gitops-apps — Argo CD GitOps apps for the Talos cluster