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
16 changes: 8 additions & 8 deletions infra/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# infra

Terraform configuration for provisioning Azure infrastructure per client deployment.
OpenTofu configuration for provisioning Azure infrastructure per client deployment.

Copilot AI Feb 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistency between the README and implementation plan. The README.md describes this as "OpenTofu configuration" but the implementation plan (docs/plans/2026-02-22-infra.md) consistently refers to "Terraform". The actual providers.tf file uses 'tofu' (which is incorrect syntax). Clarify whether this infrastructure uses OpenTofu or Terraform, and ensure consistency across all documentation.

Copilot uses AI. Check for mistakes.

Each client gets an isolated resource group containing a VM, networking, managed identity,
and a blob container in the shared backup storage account.
Expand All @@ -14,7 +14,7 @@ same outputs using provider-specific resources.

## Prerequisites

- Terraform >= 1.9 installed
- OpenTofu >= 1.9 installed (`brew install opentofu`)
- Azure CLI authenticated: `az login`
- `ARM_SUBSCRIPTION_ID` environment variable set
- Shared backup storage account pre-created (once, manually):
Expand All @@ -36,18 +36,18 @@ cd infra/azure
# 1. Edit clients/<client>.tfvars with correct values (copy from edmonton.tfvars)
# 2. Provision
export ARM_SUBSCRIPTION_ID="<your-subscription-id>"
terraform init
terraform plan -var-file=clients/<client>.tfvars
terraform apply -var-file=clients/<client>.tfvars
tofu init
tofu plan -var-file=clients/<client>.tfvars
tofu apply -var-file=clients/<client>.tfvars

# 3. Note outputs for use in the RUNBOOK
terraform output public_ip_address # → set DNS A record
terraform output backup_container_name # → AZURE_CONTAINER in breedbase-client.env
tofu output public_ip_address # → set DNS A record
tofu output backup_container_name # → AZURE_CONTAINER in breedbase-client.env
Comment on lines +39 to +45

Copilot AI Feb 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command examples use 'tofu' but should use 'terraform' if Terraform is being used, or the providers.tf file should be corrected to use 'terraform' block if OpenTofu is being used. OpenTofu is a fork of Terraform and uses the same 'terraform' block syntax. The 'tofu' keyword doesn't exist in either tool. Ensure consistency: if using OpenTofu, commands should be 'tofu' but the HCL block remains 'terraform'.

Copilot uses AI. Check for mistakes.
```

## Contents

- `providers.tf` — Terraform and azurerm provider version constraints
- `providers.tf` — OpenTofu and azurerm provider version constraints
- `variables.tf` — input contract
- `outputs.tf` — output contract
- `main.tf` — composes modules
Expand Down
4 changes: 2 additions & 2 deletions infra/azure/providers.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# infra/azure/providers.tf
terraform {
tofu {

Copilot AI Feb 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The keyword 'tofu' should be 'terraform'. In OpenTofu (and Terraform), the configuration block must use the 'terraform' keyword, not 'tofu'. This will cause a syntax error when running tofu init or terraform init.

Suggested change
tofu {
terraform {

Copilot uses AI. Check for mistakes.
required_version = ">= 1.9"
required_providers {
azurerm = {
Expand All @@ -12,5 +12,5 @@ terraform {
provider "azurerm" {
features {}
# subscription_id is read from ARM_SUBSCRIPTION_ID environment variable.
# Set it before running terraform: export ARM_SUBSCRIPTION_ID="<your-sub-id>"
# Set it before running tofu: export ARM_SUBSCRIPTION_ID="<your-sub-id>"
}