/bear-opentofu:architecture <Project> [cloud-provider] [constraints]from Bear Craft — OpenTofu
Designs a complete OpenTofu Infrastructure as Code architecture from project specs, producing module layouts, provider configs, and environment strategies.
Ships in Bear Craft — OpenTofu. Installing the plugin adds it to Claude Code.
You are a senior OpenTofu architect. You must design a complete Infrastructure as Code architecture from project specifications.
$ARGUMENTS
Arguments:
Example: /bear-opentofu:architecture "E-commerce Platform" cloud:aws services:ecs,rds,redis compliance:soc2
Plan mode is recommended. Claude activates plan mode to structure the approach, identify infrastructure components, and present an architecture strategy before creating configurations.
══════════════════════════════════════════════════════════════
OPENTOFU ARCHITECTURE
══════════════════════════════════════════════════════════════
Project: {name}
Description: {description}
──────────────────────────────────────────────────────────────
REQUIREMENTS ANALYSIS
──────────────────────────────────────────────────────────────
### Cloud Provider
| Provider | Region | Services |
|----------|--------|----------|
| {provider} | {region} | {services} |
### Required Infrastructure
| Component | Technology | Criticality |
|-----------|------------|-------------|
| {component} | {technology} | High/Medium/Low |
### Environments
| Env | Purpose | Specifics |
|-----|---------|-----------|
| dev | Development | Minimal resources |
| staging | Validation | Production-like |
| prod | Production | HA, encryption, monitoring |
──────────────────────────────────────────────────────────────
MODULE ARCHITECTURE
──────────────────────────────────────────────────────────────
┌─────────────────────────────────────────────────────────────┐
│ NETWORKING MODULE │
│ ┌───────────────┐ ┌───────────────┐ ┌────────────────┐ │
│ │ VPC │ │ Subnets │ │ Security Groups│ │
│ └───────────────┘ └───────────────┘ └────────────────┘ │
└──────────┬──────────────────────────────────────────────────┘
│
┌──────────▼──────────────────────────────────────────────────┐
│ COMPUTE MODULE │
│ ┌───────────────┐ ┌───────────────┐ ┌────────────────┐ │
│ │ ECS/EKS/EC2 │ │ Auto-Scaling │ │ Load Balancer │ │
│ └───────────────┘ └───────────────┘ └────────────────┘ │
└──────────┬──────────────────────────────────────────────────┘
│
┌──────────▼──────────────────────────────────────────────────┐
│ DATA MODULE │
│ ┌───────────────┐ ┌───────────────┐ ┌────────────────┐ │
│ │ RDS/Aurora │ │ ElastiCache │ │ S3 Storage │ │
│ └───────────────┘ └───────────────┘ └────────────────┘ │
└─────────────────────────────────────────────────────────────┘
──────────────────────────────────────────────────────────────
MODULE LAYOUT
──────────────────────────────────────────────────────────────
| Module | Purpose | Key Resources |
|--------|---------|---------------|
| networking | VPC, subnets, SGs | aws_vpc, aws_subnet |
| compute | Application workloads | aws_ecs_service, aws_lb |
| database | Data persistence | aws_db_instance |
| monitoring | Observability | aws_cloudwatch_* |
──────────────────────────────────────────────────────────────
PROJECT STRUCTURE
──────────────────────────────────────────────────────────────
infra/
├── modules/
│ ├── networking/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ ├── outputs.tf
│ │ └── versions.tf
│ ├── compute/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ ├── outputs.tf
│ │ └── versions.tf
│ ├── database/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ ├── outputs.tf
│ │ └── versions.tf
│ └── monitoring/
│ ├── main.tf
│ ├── variables.tf
│ ├── outputs.tf
│ └── versions.tf
├── environments/
│ ├── dev/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ ├── terraform.tfvars
│ │ └── backend.tf
│ ├── staging/
│ │ └── ...
│ └── prod/
│ └── ...
└── shared/
├── providers.tf
└── versions.tf
Generate module files with:
Create environment-specific configurations:
══════════════════════════════════════════════════════════════
GENERATED ARCHITECTURE
══════════════════════════════════════════════════════════════
──────────────────────────────────────────────────────────────
CREATED FILES
──────────────────────────────────────────────────────────────
| File | Description |
|------|-------------|
| infra/modules/networking/main.tf | VPC and networking |
| infra/modules/compute/main.tf | Application compute |
| infra/environments/prod/main.tf | Production config |
| infra/environments/prod/backend.tf | State backend with encryption |
──────────────────────────────────────────────────────────────
NEXT STEPS
──────────────────────────────────────────────────────────────
1. [ ] Review and adjust resource sizing per environment
2. [ ] Configure state encryption passphrase/KMS key
3. [ ] Setup CI/CD with /bear-opentofu:deploy-setup
4. [ ] Run security audit with /bear-opentofu:security-audit
5. [ ] Estimate costs with /bear-opentofu:optimize
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
5 commands in this plugin
npx claudepluginhub thebeardedbearsas/bear-craft --plugin bear-opentofuOther plugins' commands for the same job