Skip to content

IEEE-TAMU/infra

Repository files navigation

IEEE TAMU Infrastructure

Infrastructure-as-code for managing ieeetamu.org using OpenTofu and the Cloudflare provider.

Prerequisites

  • Nix (recommended) or OpenTofu/Terraform installed manually

Getting Started

1. Clone and enter the directory

git clone <repo-url>
cd infra

2. Set up the environment

With Nix (recommended):

direnv allow

This loads the Nix shell and environment variables automatically.

3. Configure credentials

Copy the example files and fill in your values:

cp .env.example .env
cp terraform.tfvars.example terraform.tfvars

4. Initialize and apply

tofu init
tofu plan
tofu apply

Usage

Command Description
tofu init Initialize backend and providers
tofu plan Preview changes
tofu apply Apply changes
tofu fmt Format files
tofu validate Validate configuration

Structure

  • main.tf — Backend and provider configuration
  • variables.tf — Input variable definitions
  • dns-*.tf — DNS record definitions grouped by purpose
  • .env.example / terraform.tfvars.example — Credential templates
  • shell.nix / .envrc — Nix and direnv configuration

Remote State

State is stored remotely in Cloudflare R2 using the S3-compatible backend. Credentials are loaded via .env.

Contributors