This guide shows the commands and prompts to deploy WordPress infrastructure on IBM Cloud using IaC Spec Kit.
Note: The specific files, directory names, and some outputs are generated by the AI and will vary depending on your AI tool (Bob, Claude, Copilot, Gemini, etc.) and the LLM model being used. The workflow structure and file types remain consistent.
- IBM Cloud account with Pay-As-You-Go plan
- IaC Spec Kit installed (
iac-specify check) - Terraform installed
- AI coding assistant running in your project directory
If you're building multiple capabilities or want governance rules that persist across features, establish principles first. This acts as memory for the AI across multiple /iac.specify runs.
/iac.principles This is a small business production website. Keep it simple but include security and automated backups. Keep costs reasonable. Use Terraform.
What this does: The AI generates governance rules for your project covering architecture principles, code principles, and implementation approaches.
Generates: .specify/memory/principles.md
principles.md contains versioned governance rules including architecture principles (like security defaults, resource tagging), code principles (like prefer curated modules, testing requirements), implementation approaches (like progressive complexity), and amendment procedures. Specific principles and their wording vary by AI tool and LLM model.
/iac.specify I need to deploy WordPress for my small business website. Should handle a few thousand visitors per day, needs to be secure with automated backups. Budget is around $500/month. Use the official WordPress Docker image.
What this does: The AI creates a cloud-agnostic infrastructure specification. If anything is critically ambiguous, it will ask up to 3 clarifying questions.
Generates:
spec.mdin a feature directory (directory name is AI-generated based on your description)checklists/requirements.mdfor quality validation
spec.md contains a cloud-agnostic specification with sections like executive summary, problem statement, infrastructure requirements, SLOs, cost constraints, success criteria, and assumptions. For example, functional requirements might include:
- Compute resources for containerized applications
- Managed relational database with automated backups
- Object storage for media files
- Load balancer for traffic distribution
- Isolated network with public/private separation
Uses generic terms rather than cloud-specific services (e.g., "managed database" not "Databases for MySQL"). Specific sections and detail vary by AI tool and LLM model.
/iac.clarify
What this does: The AI scans your spec for underspecified areas and asks targeted questions (max 5 per session). Questions are presented with multiple-choice options and the AI recommends answers.
Updates: spec.md with your answers integrated
You can provide varying levels of detail. The framework already knows from your principles and spec that you want IBM Cloud, cost-effective setup, containerized WordPress, etc. Only add details if you have specific requirements not already captured.
Option A - Minimal:
/iac.plan
Option B - Basic guidance:
/iac.plan Use us-south region
Option C - Some direction:
/iac.plan Deploy in us-south. Prefer IBM Cloud managed services.
Option D - More specific:
/iac.plan Deploy in us-south. Use Code Engine for containers, Databases for MySQL, Cloud Object Storage for media.
Option E - Very detailed:
/iac.plan Deploy in us-south. Use IBM Code Engine for WordPress with Application Load Balancer. IBM Databases for MySQL with automated backups. Cloud Object Storage for media. VPC with public/private subnets. Use terraform-ibm-modules.
What this does: The AI researches IBM Cloud best practices, Framework for Financial Services pillars, and terraform-ibm-modules. It then designs the complete infrastructure architecture.
Minimal workflow: Generates plan.md with inline research.
Enriched workflow (recommended for production): Run /iac.enrichplan after /iac.plan to generate comprehensive documentation including deep research, detailed architecture specs, module specifications, and deployment procedures.
Generates (minimal): plan.md
Generates (enriched, after running /iac.enrichplan):
plan.md- Main architecture planresearch.md- Technology decisions and justificationsarchitecture.md- Detailed component specificationsmodules.md- Terraform module specifications (if using modules)quickstart.md- Deployment procedures- Updates agent-specific context files
plan.md contains the main architecture plan including technical context (IBM Cloud, Terraform, state backend), principles validation, and infrastructure architecture. For example:
- Compute: Code Engine with auto-scaling
- Storage: Databases for MySQL with HA and Cloud Object Storage for media
- Networking: VPC with subnets and Application Load Balancer
Specific services and implementation details vary by AI tool and LLM model.
research.md contains technology decisions and justifications. May include:
- Cloud provider rationale
- Framework for Financial Services mappings (e.g., Security → encryption and access controls, Operational Excellence → monitoring)
- Curated modules identified (terraform-ibm-modules)
- Best practices and patterns
Content and depth vary by AI tool and LLM model.
architecture.md contains detailed component specifications, resource dependencies, configuration parameters, and possibly network topology diagrams. Level of detail varies by AI tool and LLM model.
modules.md (if generated) contains module specifications with input/output variables and dependencies. Whether this file is created and its content vary by AI tool and LLM model.
quickstart.md contains deployment procedures including prerequisites, initialization steps, and deployment commands. Specific steps and detail level vary by AI tool and LLM model.
/iac.tasks
What this does: The AI creates a phased task list organized by infrastructure tiers with clear execution order and parallelization opportunities.
Generates: tasks.md
tasks.md contains an ordered task breakdown organized by tiers (Setup, Foundation, Network, Compute/Data, Application, Validation). Each task has checkbox format with ID, parallel marker [P], and file path. Example tasks:
- Create VPC and subnets in iac/vpc.tf
- Configure Code Engine in iac/codeengine.tf
- Set up Databases for MySQL in iac/database.tf
Specific tasks and organization vary by AI tool and LLM model.
/iac.implement
What this does: The AI executes tasks to generate Terraform .tf files, runs formatting and validation, and marks completed tasks.
Important: This generates infrastructure code only - it does NOT deploy to IBM Cloud (no terraform apply).
Generates: Terraform configuration files (.tf files). Example files might include:
- backend.tf (COS state storage)
- provider.tf (IBM Cloud provider config)
- vpc.tf (VPC and subnets)
- codeengine.tf (Code Engine apps), database.tf (Databases for MySQL), cos.tf (Cloud Object Storage)
- loadbalancer.tf, security-groups.tf, iam.tf, outputs.tf
The AI also runs terraform fmt and terraform validate. Specific files and organization vary by AI tool and LLM model.
Updates: tasks.md with completed tasks marked as - [X]
After /iac.implement completes, you have production-ready Terraform code. The next steps are manual:
- Review the generated code
- Initialize Terraform:
terraform init - Review execution plan:
terraform plan - Deploy to IBM Cloud:
terraform apply(creates real resources and incurs costs) - Access your WordPress site using the output values
- Directory names are AI-generated: The AI decides based on your description.
- Results vary by AI tool: Different tools may generate slightly different organizations.
- Principles are project-wide: They apply to ALL features, not just WordPress.
- Specs are technology-agnostic: Uses generic terms, not IBM Cloud-specific services.
- Plans are IBM Cloud-specific: Contains IBM Cloud service names and terraform-ibm-modules.
- Deployment is manual: You run
terraform applyto create actual IBM Cloud resources. - Cost awareness:
terraform applycreates real resources that cost money.
| Command | Files Created | Purpose |
|---|---|---|
/iac.principles (optional) |
principles.md |
Project governance rules |
/iac.specify |
spec.md, checklists/requirements.md |
Cloud-agnostic requirements |
/iac.clarify (optional) |
Updates spec.md |
Resolves ambiguities |
/iac.plan |
plan.md (minimal) or plan.md + enriched docs |
IBM Cloud-specific architecture |
/iac.enrichplan (optional) |
research.md, architecture.md, modules.md, quickstart.md |
Deep research and detailed specs |
/iac.tasks |
tasks.md |
Ordered task breakdown |
/iac.implement |
*.tf files |
Terraform code ready for deployment |