TTanimTasnim Rahman Tanim — back to top
All work

DevOps · Infrastructure as code

OCI servers as code, with a spend guard

Terraform-built OCI servers with a budget tripwire that stops them before a bill.

Cost
$0 monthly bill, enforced
Provisioning
Terraform end to end

Architecture

  1. Terraform+ retry loop
  2. OCI Ampere VMUbuntu ARM
  3. Coolifycloud-init
  4. Budget1 USD cap
  5. Event rulealert fired
  6. OCI Functionstop-all-vms

Problem

Free-tier ARM servers are hard to get (capacity errors) and easy to overspend on.

Built

Terraform and cloud-init stand up Ubuntu ARM servers running Coolify. A retry loop waits out capacity errors. A budget alert fires an OCI event rule that runs a serverless function to stop every VM.

Terraform and cloud-init build Ubuntu ARM servers with Coolify ready to deploy.
A retry loop re-runs the apply until Ampere capacity frees up.
Budget → event rule → OCI Function stops every VM, in Terraform or one Cloud Shell script.

Security

  • SSH and dashboards limited to one trusted IP.
  • IAM dynamic group and least-privilege policy for the stop function.

Stack

  • Terraform
  • OCI Functions
  • cloud-init
  • Coolify
  • OCI
Next case studyOikyo community events platform