export_architecture
Convert finalized cloud architecture specifications into Terraform, CloudFormation, diagrams, or compliance reports for infrastructure deployment and documentation.
Instructions
Export an architecture spec to Terraform, CloudFormation, Mermaid, D2, or other formats.
Returns {'format': str, 'content': str} where content is the
ready-to-write payload. Terraform/CFN outputs use variables for sensitive
values (no hardcoded credentials), include provider blocks with region
configuration, and generate data sources for VPC/subnet discovery.
When to use: You have a finalized ArchSpec and need IaC code, a diagram,
or an audit artifact. For multi-format export, call once per format.
Behavior: Pure computation — no LLM, no network. Does not write files or deploy; the caller is responsible for persisting or applying the returned content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec_json | Yes | ArchSpec to export. Components are translated to provider-native resources; connections become security-group / firewall / IAM rules. | |
| format | No | Target output format. Values: 'terraform' (HCL with provider blocks, 24 AWS / 11 GCP / 10 Azure resource types), 'cloudformation' (YAML template with Parameters/Outputs), 'mermaid' (tier-grouped flowchart), 'd2' (D2 diagram), 'sbom' (CycloneDX 1.5 service bill of materials), 'aibom' (OWASP AI bill of materials), 'compliance' (audit-ready markdown report). | terraform |