Robertjam954/multimodal_rag_application / .claude/skills/azure-enterprise-infra-planner
azure-enterprise-infra-planner
VerifiedArchitect and provision enterprise Azure infrastructure from workload descriptions. For cloud architects and platform engineers planning networking, identity, security, compliance, and multi-resource topologies with WAF alignment. Generates Bicep or Terraform directly (no azd). WHEN: 'plan Azure infrastructure', 'architect Azure landing zone', 'design hub-spoke network', 'plan multi-region DR topology', 'set up VNets firewalls and private endpoints', 'subscription-scope Bicep deployment', 'Azure Backup for VM workloads'. PREFER azure-prepare FOR app-centric workflows.
references/terraform-generation.md
View on GitHub# Terraform Generation
Generate Terraform IaC files from the approved infrastructure plan.
## File Structure
Generate files under `<project-root>/infra/`:
```
infra/
├── main.tf # Root module — calls child modules
├── variables.tf # Input variable declarations
├── outputs.tf # Output values
├── terraform.tfvars # Default variable values
├── providers.tf # Provider configuration
├── backend.tf # State backend configuration
└── modules/
├── storage/
│ ├── main.tf
│ ├── variables.tf
│ └── outputs.tf
├── compute/
│ ├── main.tf
│ ├── variables.tf
│ └── outputs.tf
└── networking/
├── main.tf
├── variables.tf
└── outputs.tf
```
## Generation Steps
1. Create `infra/` directory — create `<project-root>/infra/` and `<project-root>/infra/modules/` directories. All files in subsequent steps go here.
2. Read plan — load `<project-root>/.azure/infrastructure-plan.json`, verify `meta.status === "approved"`
3. Generate providers.tf — write `infra/providers.tf` to configure `azurerm` provider with required features
4. Generate modules — group resources by category; one module per group under `infra/modules/`
5. Generate root main.tf — write `infra/main.tf` that calls all modules, wire outputs to inputs
6. Generate variables.tf — write `infra/variables.tf` with all configurable parameters
7. Generate terraform.tfvars — write `infra/terraform.tfvars` with default values from the plan
8. Generate backend.tf — write `infra/backend.tf` for Azure Storage backend remote state
## Terraform Conventions
- Use `azurerm` provider (latest stable version)
- Set `features {}` block in provider configuration
- Use `variable` blocks with `description`, `type`, and `default` where appropriate
- Use `locals` for computed values and naming patterns
- Use `depends_on` only when implicit dependencies are insufficient
- Tag all resources with `environment`, `workload`, and `managed-by = "terraform"`
## Provider Configuration
```hcl
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 4.0"
}
}
}
provider "azurerm" {
features {}
subscription_id = var.subscription_id
}
```
## Multi-Environment
For multi-environment plans, generate one `.tfvars` file per environment:
```
infra/
├── main.tf
├── variables.tf
├── dev.tfvars
├── staging.tfvars
└── prod.tfvars
```
Deploy with: `terraform apply -var-file=prod.tfvars`
## Validation Before Deployment
Run `terraform validate` and `terraform plan` to verify before applying.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |