Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.17 KB

File metadata and controls

45 lines (33 loc) · 1.17 KB

iac-github

Infrastructure as Code for GitHub resources using OpenTofu.

Prerequisites

  • OpenTofu — version pinned in .opentofu-version. Install via tenv or tofuenv to auto-select the right version.
  • Mage
  • Go 1.26+
  • GITHUB_TOKEN environment variable with appropriate permissions

Usage

cd components/repositories/magefiles

# List available targets
mage -l

# Initialize and plan
OWNER=monkescience mage tofu:plan

# Apply changes
mage tofu:apply

Environment Variables

Variable Default Description
OWNER monkescience GitHub organization name
GITHUB_TOKEN - GitHub personal access token

Structure

components/
  repositories/         # GitHub repository management
    base/               # Shared Terraform configuration
    <owner>/            # Owner-specific configuration (e.g. monkescience/)
      definitions/      # Repository definition YAML files
    magefiles/          # Mage build targets
libraries/
  mageutil/             # Shared Mage utilities