Infrastructure as Code for GitHub resources using OpenTofu.
- OpenTofu (or Terraform)
- Mage
- Go 1.24+
GITHUB_TOKENenvironment variable with appropriate permissions
cd components/repositories/magefiles
# List available targets
mage -l
# Initialize and plan
OWNER=monkescience mage tofu:plan
# Apply changes
mage tofu:apply| Variable | Default | Description |
|---|---|---|
OWNER |
monkescience |
GitHub organization name |
GITHUB_TOKEN |
- | GitHub personal access token |
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