Skip to content

Feature/infra - #3

Merged
countercheck merged 13 commits into
mainfrom
feature/infra
Feb 24, 2026
Merged

Feature/infra#3
countercheck merged 13 commits into
mainfrom
feature/infra

Conversation

@countercheck

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 24, 2026 16:28
@countercheck
countercheck merged commit b89826d into main Feb 24, 2026
4 checks passed
@countercheck
countercheck deleted the feature/infra branch February 24, 2026 16:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces OpenTofu/Terraform infrastructure-as-code configuration for provisioning per-client Azure environments. The implementation replaces the previously planned Bicep/ARM approach with a provider-agnostic directory structure that supports multi-cloud deployments. Each client deployment creates an isolated Azure resource group containing a VM, networking components, managed identity, and a dedicated backup container in a shared storage account.

Changes:

  • Added OpenTofu configuration files defining Azure infrastructure modules for VM provisioning and backup container management
  • Created reusable modules (vm/ and backup-container/) with provider-specific implementations following a contract-based architecture
  • Added comprehensive documentation including design rationale, deployment workflows, and an implementation plan
  • Included example client configuration (edmonton.tfvars) demonstrating per-client customization

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
infra/azure/providers.tf Defines OpenTofu version constraints and azurerm provider configuration
infra/azure/variables.tf Input contract defining client configuration parameters with validation
infra/azure/outputs.tf Output contract exposing VM IP, resource group, and backup container details
infra/azure/main.tf Orchestrates vm and backup_container modules
infra/azure/modules/vm/main.tf Creates VM, networking (VNet, NSG, NIC), managed identity, and RBAC assignments
infra/azure/modules/vm/variables.tf VM module input parameters
infra/azure/modules/vm/outputs.tf VM module outputs (IP address, resource group name)
infra/azure/modules/backup-container/main.tf Creates per-client blob container in shared storage account
infra/azure/modules/backup-container/variables.tf Backup container module inputs
infra/azure/modules/backup-container/outputs.tf Backup container module outputs (container name)
infra/azure/clients/edmonton.tfvars Example client-specific configuration values
infra/azure/.gitignore Excludes Terraform state files and temporary files from version control
infra/README.md Updated documentation with OpenTofu deployment instructions and architecture overview
docs/plans/2026-02-22-infra.md Detailed step-by-step implementation plan for the infrastructure setup
docs/plans/2026-02-22-infra-design.md Architecture decisions, design rationale, and provider isolation strategy

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread infra/README.md
Comment on lines +39 to +45
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

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.
Comment thread infra/README.md
# 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.
Comment thread infra/azure/providers.tf
@@ -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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants