Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: opentofu/setup-opentofu@v1
with:
tofu_version_file: .opentofu-version
- run: tofu fmt -check -recursive
working-directory: terraform

Expand All @@ -25,6 +27,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: opentofu/setup-opentofu@v1
with:
tofu_version_file: .opentofu-version
- run: tofu init -backend=false -input=false
working-directory: terraform/${{ matrix.dir }}
- run: tofu validate
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/terraform-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- uses: opentofu/setup-opentofu@v1
with:
tofu_version_file: .opentofu-version
- name: Write backend.conf
run: printf 'endpoints = { s3 = "%s" }\n' "$R2_ENDPOINT" > backend.conf
- name: Tofu init
Expand Down Expand Up @@ -90,6 +92,8 @@ jobs:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- uses: opentofu/setup-opentofu@v1
with:
tofu_version_file: .opentofu-version
- name: Write backend.conf
run: printf 'endpoints = { s3 = "%s" }\n' "$R2_ENDPOINT" > backend.conf
- name: Tofu init
Expand Down
1 change: 1 addition & 0 deletions .opentofu-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.12.5
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
- **IaC**: OpenTofu (Terraform fork) with Cloudflare + AWS providers
- **State**: Cloudflare R2 bucket (shared across all providers)
- **Env**: `.env.local` (not `.env`), loaded via direnv
- **OpenTofu version**: pinned in `.opentofu-version` (repo root) — the single
source CI reads via `setup-opentofu`'s `tofu_version_file`. Bumping across a
minor (1.12 → 1.13) also requires updating `required_version` in all five
roots (`terraform/{gcp,aws,azure}/provider.tf`,
`terraform/{bootstrap,cloudflare}/versions.tf`), which is deliberately
bounded (`~> 1.12`) so an unintended jump fails loudly at `init`.

## Commands
- `just cloudflare` — plan and apply Cloudflare resources
Expand Down
2 changes: 1 addition & 1 deletion terraform/aws/provider.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 1.0.0"
required_version = "~> 1.12"

required_providers {
aws = {
Expand Down
2 changes: 1 addition & 1 deletion terraform/azure/provider.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 1.0.0"
required_version = "~> 1.12"

required_providers {
azurerm = {
Expand Down
2 changes: 1 addition & 1 deletion terraform/bootstrap/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ terraform {
version = "~> 4.0"
}
}
required_version = ">= 1.0.0"
required_version = "~> 1.12"
}
2 changes: 1 addition & 1 deletion terraform/cloudflare/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ terraform {
version = "~> 3.0"
}
}
required_version = ">= 1.0.0"
required_version = "~> 1.12"

backend "s3" {
# endpoints injected via backend.conf (generated by justfile from env vars)
Expand Down
2 changes: 1 addition & 1 deletion terraform/gcp/provider.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 1.0.0"
required_version = "~> 1.12"

required_providers {
google = {
Expand Down
Loading