Terraform Infrastructure Builder
Run ID: 69cbbd8e61b1021a29a8be392026-03-31Infrastructure
PantheraHive BOS
BOS Dashboard

Generate production-ready Terraform configurations for cloud infrastructure including VPC, compute, storage, databases, and networking.

This document outlines the detailed design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "Terraform Infrastructure Builder" tool. This tool aims to provide a highly intuitive and guided experience for generating production-ready Terraform configurations for cloud infrastructure.


Terraform Infrastructure Builder: Design & UX Specification

1. Introduction

The Terraform Infrastructure Builder is designed to democratize cloud infrastructure provisioning by enabling users to generate robust, secure, and best-practice-compliant Terraform configurations through a user-friendly interface. This eliminates the need for deep Terraform expertise for common infrastructure patterns, while still providing advanced options for seasoned professionals.

2. Core Objectives

  • Simplicity: Provide an intuitive step-by-step workflow for infrastructure definition.
  • Best Practices: Automatically incorporate cloud provider and Terraform best practices (e.g., security groups, naming conventions, module usage).
  • Flexibility: Allow for customization and advanced configuration where needed.
  • Visibility: Offer clear insights into the generated infrastructure and associated costs.
  • Actionability: Produce ready-to-deploy Terraform code with clear instructions.
  • Cloud Agnostic (Initial Focus AWS, Azure, GCP): Support major cloud providers with a consistent user experience.

3. Detailed Design Specifications

The builder will be a web-based application, structured around a modular, wizard-driven workflow.

3.1. Application Architecture

  • Frontend: Modern JavaScript framework (e.g., React, Vue, Angular) for a dynamic and responsive user interface.
  • Backend: API-driven service responsible for:

* User/Project management.

* Cloud provider API integration (for region/service discovery, best practices).

* Terraform module orchestration and generation logic.

* State management for user configurations.

* Cost estimation integration (if applicable).

  • Terraform Engine: Utilizes pre-validated, modular Terraform code templates and configurations to ensure production readiness.

3.2. Key Modules & Features

  1. Project & Workspace Management:

* Create, view, edit, and delete infrastructure projects.

* Each project represents a distinct Terraform root module.

* Version control integration (e.g., connect to Git repositories for output).

  1. Cloud Provider Selection:

* Initial choice between AWS, Azure, GCP.

* Region/Availability Zone selection.

  1. Networking (VPC/VNet/VCN) Configuration:

* Define primary CIDR block.

* Create public and private subnets across multiple Availability Zones.

* Configure Internet Gateways, NAT Gateways, VPNs, Peering connections.

* Route table management.

  1. Compute Configuration:

* Virtual Machines (EC2/VMs):

* Instance type, OS image, CPU/RAM, storage.

* Associated subnets, security groups/NSGs.

* Auto Scaling Groups (min/max/desired capacity, scaling policies).

* User data/Cloud-init scripts.

* Containers (ECS/EKS/AKS/GKE):

* Cluster creation (type, size, node groups).

* Basic service/deployment definitions.

  1. Storage Configuration:

* Object Storage (S3/GCS/Blob Storage):

* Bucket/Container creation, naming, versioning, encryption, lifecycle policies.

* Block Storage (EBS/Managed Disks):

* Volume size, type, encryption, attachment options.

* File Storage (EFS/Azure Files/Cloud Filestore):

* Basic file system creation and mounting options.

  1. Database Configuration:

* Managed Databases (RDS/Cloud SQL/Azure SQL DB):

* Database engine, version, instance class, storage size, multi-AZ/HA.

* Security group/NSG association, backup policies.

* Initial database creation and user setup.

  1. Load Balancing & CDN:

* Application Load Balancers (ALB/Application Gateway/HTTP(S) Load Balancing).

* Network Load Balancers (NLB/Standard Load Balancer/TCP/UDP Load Balancing).

* Target groups, listener rules.

* Basic CDN integration (CloudFront/Azure CDN/Cloud CDN).

  1. Security & Compliance:

* Centralized Security Group/Network Security Group management (ingress/egress rules).

* IAM Roles/Service Accounts with least-privilege recommendations.

* Key Management Service (KMS/Key Vault/Cloud KMS) integration for encryption.

  1. Review & Generation:

* Comprehensive summary of all selected resources and their configurations.

* Estimated monthly cost breakdown (optional, but highly desirable).

* Validation report highlighting potential issues or warnings.

* "Generate Terraform" button.

  1. Output & Management:

* Downloadable .zip file containing:

main.tf (or modular .tf files).

* variables.tf

* outputs.tf

* versions.tf

* README.md with deployment instructions (terraform init, plan, apply).

* Option to push generated code directly to a connected Git repository.

* Instructions for setting up cloud provider credentials.

4. Wireframe Descriptions

The user interface will follow a multi-step wizard pattern, complemented by visual aids and contextual information.

4.1. Dashboard / Project Selection

  • Layout: Left sidebar for navigation (Dashboard, Projects, Templates, Settings). Main content area for project list.
  • Elements:

* "Create New Project" button (prominent).

* Table/Card view of existing projects: Project Name, Cloud Provider, Last Modified, Status (e.g., "Draft", "Generated"), Actions (Edit, View Output, Delete).

* Search and filter options for projects.

  • Interaction: Clicking "Create New Project" initiates the wizard. Clicking an existing project allows editing or viewing generated output.

4.2. Step 1: Project & Cloud Provider Setup

  • Layout: Centered form with a progress indicator at the top (e.g., "1/7: Provider Setup").
  • Elements:

* Project Name input field.

* Cloud Provider dropdown (AWS, Azure, Google Cloud).

* Region dropdown (dynamically populated based on provider).

* Optional: "Use Template" dropdown (e.g., "2-Tier Web App", "Data Lake Foundation").

* "Next" button.

  • Interaction: Selecting a provider will update available regions.

4.3. Step 2: Networking Configuration

  • Layout: Two-column layout. Left: Configuration forms. Right: Visual topology diagram.
  • Elements:

* VPC/VNet: CIDR Block input, name.

* Subnets: "Add Subnet" button. For each subnet: Name, CIDR, Type (Public/Private), Availability Zone dropdown.

* Gateways: Checkboxes for Internet Gateway, NAT Gateway (with instance type/subnet selection), VPN (basic config).

* Visualizer: A dynamic diagram showing the VPC, subnets, and gateways as they are configured. Lines connecting resources.

  • Interaction: Adding subnets updates the visualizer. Input validation for CIDR overlaps.

4.4. Step 3: Compute Configuration

  • Layout: Tabbed interface for VM Instances, Load Balancers, Container Clusters. Each tab has a list of configured resources and an "Add New" button.
  • Elements (VM Instances Tab):

* "Add VM Instance" button.

* Form for VM: Name, Instance Type, OS Image, Count, Subnet dropdown, Security Group dropdown (with "Create New Security Group" option), User Data text area.

* For Auto Scaling Group: Min/Max/Desired capacity, scaling policies.

  • Interaction: Selecting a subnet filters available security groups. Creating a new security group temporarily opens a modal.

4.5. Step 4: Storage Configuration

  • Layout: Similar to Compute, with tabs for Object Storage, Block Storage, File Storage.
  • Elements (Object Storage Tab):

* "Add Bucket" button.

* Form for Bucket: Name, Versioning (checkbox), Encryption (dropdown), Lifecycle Rules (add rule button).

  • Interaction: Adding lifecycle rules opens a sub-form.

4.6. Step 5: Database Configuration

  • Layout: List of databases with "Add Database" button.
  • Elements:

* Form for Database: Engine, Version, Instance Class, Storage Size, Multi-AZ (checkbox), Subnet Group, Security Group, Master Username/Password.

  • Interaction: Subnet Group dropdown dynamically created based on selected subnets in Step 2.

4.7. Step 6: Security Configuration (Centralized)

  • Layout: Table view of all Security Groups/Network Security Groups identified/created, with options to edit ingress/egress rules.
  • Elements:

* Table: SG Name, Associated Resources, Ingress Rules (summary), Egress Rules (summary), Actions (Edit Rules).

* Edit Rules Modal: Add/Remove rules (Protocol, Port, Source/Destination CIDR/SG).

  • Interaction: Editing rules in the modal updates the table summary.

4.8. Step 7: Review & Generate

  • Layout: Full-width summary view, broken down by resource type (Networking, Compute, Storage, etc.).
  • Elements:

* Collapsible sections for each resource category, showing a high-level summary of configured items.

* "Estimated Cost" section (if implemented).

* "Validation Report" section (list of warnings/errors, e.g., "Missing security group for DB").

* "Back" and "Generate Terraform" buttons.

  • Interaction: Users can click on a resource summary to jump back to the relevant configuration step. "Generate Terraform" button initiates backend processing.

4.9. Output View

  • Layout: Code editor area, download button, Git integration section.
  • Elements:

* Code Editor: Displays main.tf by default, with tabs for variables.tf, outputs.tf, versions.tf. Syntax highlighting.

* "Download All Files (.zip)" button.

* "Push to Git Repository" section: Connect to GitHub/GitLab/Bitbucket, select repository, commit message input, "Push" button.

* "Next Steps" instructions: terraform init, terraform plan, terraform apply commands.

  • Interaction: Users can copy code snippets or download the entire project.

5. Color Palettes

A professional, clean, and modern aesthetic will be adopted, using a palette that is easy on the eyes and provides good contrast for accessibility.

  • Primary Brand Color: #007BFF (A vibrant, trustworthy blue - common for tech/SaaS)
  • Secondary Accent Color: #28A745 (A clear green for success, positive actions)
  • Tertiary Accent Color: #FFC107 (A warm yellow for warnings, emphasis)
  • Danger/Error Color: #DC3545 (A strong red for errors, destructive actions)
  • Neutral Palette:

* Text: #343A40 (Dark charcoal for primary text)

* Subtle Text/Icons: #6C757D (Medium gray for secondary text, disabled states)

* Borders/Dividers: #DEE2E6 (Light gray for subtle separation)

* Backgrounds:

* #F8F9FA (Very light gray for main content areas)

* `

gemini Output

As a professional deliverable for the "Terraform Infrastructure Builder" workflow, this document outlines the comprehensive design specifications, wireframe descriptions, color palettes, and UX recommendations for a robust and intuitive platform. The goal is to enable users to generate production-ready Terraform configurations for cloud infrastructure efficiently and reliably.


Terraform Infrastructure Builder: Design Specifications

1. Project Overview

The Terraform Infrastructure Builder is a web-based application designed to simplify and accelerate the process of generating production-grade Terraform configurations for various cloud providers. It will provide a guided, interactive experience, enabling users to define their desired infrastructure components (VPC, compute, storage, databases, networking) through a user-friendly interface, which then translates these selections into executable Terraform code.

2. Functional Requirements

2.1. Core Infrastructure Configuration

  • Cloud Provider Selection:

* Ability to select target cloud provider (e.g., AWS, Azure, GCP).

* Provider-specific resource options and validations.

  • Region/Availability Zone Selection:

* Define the primary and secondary regions for infrastructure deployment.

* Select specific Availability Zones within chosen regions.

  • Virtual Private Cloud (VPC) / Virtual Network Configuration:

* Define VPC CIDR blocks.

* Create public and private subnets, specifying CIDR blocks for each.

* Configure Internet Gateways, NAT Gateways, and VPN Gateways.

* Define Route Tables and their associations.

* Support for VPC peering configurations.

  • Compute Resources (Instances/VMs):

* Select instance types (e.g., t3.medium, m5.large).

* Choose operating system images (AMIs, marketplace images).

* Configure instance count, auto-scaling groups, and launch configurations.

* Define user data/bootstrapping scripts.

* Attach/detach Elastic IP addresses.

* Integrate with Load Balancers (ALB, NLB, ELB).

  • Storage Services:

* Block Storage (e.g., EBS, Managed Disks):

* Specify volume type (gp2, io1, st1), size, IOPS.

* Enable encryption.

* Attach to compute instances.

* Object Storage (e.g., S3, Blob Storage):

* Create buckets/containers, specify names, regions.

* Configure access policies (ACLs, Bucket Policies).

* Enable versioning, logging, encryption (SSE-S3, KMS).

* Lifecycle management rules.

  • Database Services (e.g., RDS, Aurora, Cloud SQL, Cosmos DB):

* Select database engine (MySQL, PostgreSQL, SQL Server, Oracle, MongoDB, Cassandra).

* Configure instance class, storage size, and IOPS.

* Define multi-AZ deployment, read replicas.

* Set master username and password.

* Configure backup retention, snapshots, and encryption.

* Specify security group access.

  • Networking & Security:

* Security Groups / Network Security Groups:

* Define ingress/egress rules (ports, protocols, source/destination CIDRs).

* Associate with instances, load balancers, databases.

* Network ACLs (NACLs):

* Define inbound/outbound rules (ports, protocols, source/destination CIDRs, allow/deny).

* DNS Services (e.g., Route 53, Cloud DNS):

* Create hosted zones.

* Define A, CNAME, MX, TXT records.

* Configure routing policies (simple, weighted, latency, failover).

  • Module Management:

* Pre-built Module Library: Access to a curated library of battle-tested Terraform modules for common patterns (e.g., ECS cluster, EKS cluster, serverless functions).

* Custom Module Integration: Ability to upload or link to custom Terraform modules from Git repositories.

  • Output Generation:

* Generate a complete set of Terraform .tf files (main.tf, variables.tf, outputs.tf, versions.tf, providers.tf).

* Option to download generated files as a .zip archive.

* Option to push directly to a configured Git repository.

  • Configuration Validation:

* Syntactic Validation: Real-time checking for Terraform syntax errors.

* Semantic Validation: Check for logical inconsistencies and adherence to cloud provider best practices (e.g., required parameters, valid CIDR ranges).

  • Terraform State Management Integration:

* Support for configuring remote state backends (e.g., S3, Azure Blob Storage, Terraform Cloud).

* Option to integrate with Terraform Cloud workspaces.

2.2. User Experience & Collaboration

  • Project Management:

* Create, view, edit, and delete infrastructure projects.

* Version history for project configurations.

  • Role-Based Access Control (RBAC):

* Define user roles (e.g., Admin, Editor, Viewer) with granular permissions.

  • Audit Logging:

* Track all changes made to infrastructure configurations.

  • Cost Estimation (Optional but highly recommended):

* Provide real-time estimated costs based on selected resources (e.g., using terraform plan output or cloud provider APIs).

3. Non-Functional Requirements

  • Performance:

* Rapid generation of Terraform configurations (within seconds).

* Responsive UI with minimal latency.

  • Scalability:

* Ability to handle complex infrastructure configurations with hundreds of resources.

* Support for a growing number of users and projects.

  • Security:

* Secure authentication and authorization mechanisms (e.g., OAuth2, SAML).

* Data encryption at rest and in transit for sensitive configuration data.

* Adherence to industry best practices for web application security (OWASP Top 10).

* Least privilege access for API integrations with cloud providers.

  • Reliability:

* High availability of the builder application.

* Robust error handling and informative error messages.

* Automated backups of project configurations.

  • Maintainability:

* Modular and well-documented codebase.

* Easy to update and extend with new cloud resources and providers.

  • Usability:

* Intuitive and guided user interface.

* Clear and concise documentation and help text.

  • Compatibility:

* Support for multiple Terraform versions.

* Compatibility with major cloud provider APIs (AWS, Azure, GCP).

  • Observability:

* Comprehensive logging and monitoring of application health and usage.


Wireframe Descriptions

The following wireframe descriptions outline the key screens and interactions within the Terraform Infrastructure Builder, focusing on a multi-step wizard approach for complex configurations.

1. Dashboard / Project Overview

  • Layout: Left sidebar for navigation, main content area for project listings.
  • Elements:

* Header: Application logo, user profile/settings, "New Project" button.

* Sidebar: "Dashboard", "Projects", "Modules", "Integrations", "Settings".

* Project List: Table or card view showing existing projects. Columns: Project Name, Cloud Provider, Region, Last Modified, Status (e.g., Draft, Generated), Actions (Edit, View Code, Delete).

* "Create New Project" Button: Prominently displayed, leading to the "Cloud Provider Selection" screen.

  • Interaction: Click on a project to view/edit its configuration. Click "New Project" to start a new build.

2. Cloud Provider & Region Selection (Step 1 of N)

  • Layout: Centered content area with a clear progress indicator (e.g., "Step 1 of 6: Select Provider").
  • Elements:

* Cloud Provider Cards: Interactive cards for AWS, Azure, GCP, etc., with their respective logos.

* Region Selector: Dropdown or multi-select component to choose primary and secondary deployment regions.

* "Next" Button: Enabled after selections are made.

* "Back" / "Cancel" Buttons: For navigation.

  • Interaction: User clicks on a cloud provider card, then selects one or more regions.

3. VPC / Networking Configuration (Step 2 of N)

  • Layout: Tabbed interface or accordion for different networking components (VPC, Subnets, Gateways, Route Tables, NACLs).
  • Elements:

* VPC Definition: Input fields for VPC Name, CIDR Block.

* Subnet Configuration:

* Table with rows for each subnet.

* Input fields: Subnet Name, CIDR Block, Availability Zone, Type (Public/Private).

* Buttons to "Add Subnet" or "Delete Subnet".

* Visual representation (diagram) of subnets within the VPC.

* Gateway Configuration: Checkboxes/toggles for Internet Gateway, NAT Gateway, VPN Gateway.

* Security Groups: List of existing SGs, "Add New Security Group" button, detailed ingress/egress rule editor.

  • Interaction: Users define network topology, add rules, and see real-time validation feedback.

4. Compute Resources Configuration (Step 3 of N)

  • Layout: Card-based system for adding compute instances or auto-scaling groups.
  • Elements:

* "Add Compute Resource" Button: Opens a modal or expands a section.

* Compute Resource Card (for each defined resource):

* Resource Name, Instance Type, AMI/OS, Count/Min/Max (for ASG).

* Associated VPC/Subnet, Security Groups.

* "Edit", "Duplicate", "Delete" actions.

* Detailed Configuration Form (in modal/expanded section):

* Dropdowns for Instance Type, AMI.

* Sliders/inputs for desired capacity, min/max for ASG.

* Text area for User Data script.

* Multi-select for Security Groups.

* Dropdown for Key Pair.

* Checkboxes for public IP, monitoring, etc.

  • Interaction: Users add, configure, and manage their compute instances or auto-scaling groups.

5. Storage & Database Configuration (Step 4 of N)

  • Layout: Similar to compute, using cards or dedicated sections for different storage and database types.
  • Elements:

* "Add Storage Resource" / "Add Database Instance" Buttons.

* Storage Card (e.g., S3 Bucket, EBS Volume):

* Resource Name, Type, Size, Encryption Status.

* "Edit", "Delete" actions.

* Database Card (e.g., RDS Instance, Aurora Cluster):

* Resource Name, Engine, Instance Class, Multi-AZ, Storage.

* "Edit", "Delete" actions.

* Detailed Configuration Forms:

* Dropdowns for engine, instance class, storage type.

* Inputs for size, username, password.

* Checkboxes for Multi-AZ, encryption, backups.

* Security Group association.

  • Interaction: Users define and configure their storage and database requirements.

6. Review & Generate (Step 5 of N)

  • Layout: Summary page, potentially with collapsible sections for each infrastructure component.
  • Elements:

* Summary Cards: Each card (VPC, Compute, Storage, DB) provides a high-level overview of configurations made in previous steps.

* "Edit" Button: Within each summary card, to jump back to the relevant configuration step.

* Cost Estimate Display: Prominently displayed (if feature enabled).

* "Generate Terraform Code" Button: Main call to action.

* "Back" / "Save Draft" Buttons.

  • Interaction: Users review their entire configuration before initiating code generation.

7. Generated Code View & Download (Step 6 of N)

  • Layout: Code editor-like interface occupying the main content area.
  • Elements:

* File Tabs: For main.tf, variables.tf, outputs.tf, providers.tf, versions.tf.

* Code Editor: Syntax-highlighted display of the generated Terraform code.

* "Download All (.zip)" Button: To download the entire configuration.

* "Push to Git" Button: (If VCS integration configured) to push

gemini Output

Step 3 of 3: Finalize Design Assets for Terraform Infrastructure Builder

This document outlines the detailed design specifications, wireframe descriptions, color palette, and user experience (UX) recommendations for a hypothetical "PantheraHive Terraform Infrastructure Builder" application. This application serves as a user-friendly interface to generate, review, and manage production-ready Terraform configurations for cloud infrastructure, aligning with the overall workflow goal of building robust cloud environments.


1. Introduction to the PantheraHive Terraform Infrastructure Builder

The PantheraHive Terraform Infrastructure Builder is envisioned as a powerful, intuitive web-based application designed to abstract the complexities of writing Terraform code directly. It empowers users – from DevOps engineers to cloud architects – to visually design and configure their cloud infrastructure, generating validated and production-ready Terraform configurations.

Workflow Context: This "finalize_design_assets" step focuses on the user interface and experience design of this builder application itself, which will then facilitate the creation of the Terraform configurations as described in the overall workflow.

Target Audience:

  • DevOps Engineers
  • Cloud Architects
  • Software Developers with cloud responsibilities
  • IT Operations Teams

Core Goals for the UI/UX:

  • Simplicity & Intuition: Make complex cloud infrastructure design accessible.
  • Efficiency: Reduce the time and effort required to author Terraform configurations.
  • Accuracy & Reliability: Minimize human error through guided inputs and real-time validation.
  • Clarity & Transparency: Provide clear visual representations and direct access to generated code.
  • Scalability: Support a wide range of cloud resources and configurations.
  • Collaboration: Facilitate team-based infrastructure development.

2. Detailed Design Specifications

2.1 Application Name & Branding

  • Application Name: PantheraHive Terraform Builder
  • Branding: Incorporate PantheraHive's existing brand identity (if available), focusing on professionalism, reliability, and innovation.

2.2 Key Features & Functionality (UI-Centric)

  • Cloud Provider Agnostic Design: Initially focus on one provider (e.g., AWS), with an architecture to easily extend to others (Azure, GCP).
  • Guided Project Creation: A step-by-step wizard for new infrastructure projects.
  • Visual Infrastructure Designer: An interactive canvas or diagram view for network topology and resource placement.
  • Resource Configuration Forms: Detailed, context-sensitive forms for configuring individual cloud resources (VPC, EC2, S3, RDS, etc.).
  • Real-time Validation: Instant feedback on configuration errors and best practice violations.
  • Terraform Code Preview: A dedicated pane to view the generated main.tf, variables.tf, outputs.tf files in real-time.
  • Code Export & Download: Options to download the generated Terraform files.
  • Version Control Integration: Direct commit/pull request functionality for Git repositories (e.g., GitHub, GitLab, Bitbucket).
  • Module & Template Library: Browse, import, and manage custom or pre-built Terraform modules.
  • Project Dashboard: Overview of existing infrastructure projects, their status, and quick actions.
  • Audit Trail & Activity Logs: Track changes and user actions within a project.

2.3 System Requirements (Implicit for UI)

  • Modern web browser compatibility (Chrome, Firefox, Edge, Safari).
  • Responsive design for various screen sizes (desktop primary, tablet secondary).

3. Wireframe Descriptions

The application will follow a standard dashboard and wizard-based interaction model, providing clear navigation and progressive disclosure of information.

3.1 Global Navigation & Layout

  • Header:

* PantheraHive Logo (Left)

* Application Title: "Terraform Builder"

* Search Bar (Optional, for resources/projects)

* User Profile/Settings (Right)

* Notifications Icon

  • Sidebar Navigation (Left):

* Dashboard (Home)

* Projects

* Modules Library

* Templates

* Settings

* Help/Documentation

3.2 Key Screens & Interactions

A. Dashboard / Project Overview Screen

  • Layout: Main content area with a "Create New Project" prominent button.
  • Content:

* List/Card view of "My Projects". Each card displays:

* Project Name

* Cloud Provider

* Last Modified Date

* Status (e.g., "Draft", "Generated", "Deployed" - if deployment features are added later)

* Action buttons (Edit, View Code, Download, Delete).

* "Getting Started" section for new users (optional).

* "Recent Activity" feed.

  • Interaction: Clicking on a project card opens the project's configuration view.

B. New Project Wizard (Step-by-Step Configuration)

This wizard guides users through the essential infrastructure setup. A progress indicator (e.g., numbered steps, breadcrumbs) will be visible throughout.

  • Step 1: Project Details & Cloud Provider

* Fields: Project Name, Description, Cloud Provider (Dropdown: AWS, Azure, GCP), Region (Dropdown, dependent on provider).

* Validation: Required fields, unique project name.

* Navigation: "Next" button.

  • Step 2: Network Configuration (VPC/VNet)

* Section 1: VPC/VNet Details

* Fields: VPC Name, CIDR Block (e.g., 10.0.0.0/16), DNS Support (Toggle), Tenancy (Dropdown).

* Visual Aid: A simple diagram showing the VPC with its CIDR block.

* Section 2: Subnet Configuration

* Table/List View: Add/Remove Subnets.

* Fields per Subnet: Name, Availability Zone (Dropdown), CIDR Block (auto-suggested based on VPC, with manual override), Public/Private (Toggle).

* Visual Aid: Subnets appearing within the VPC diagram as they are added.

* Section 3: Internet Gateway / NAT Gateway (Optional)

* Toggles to enable/disable.

* Basic configuration fields if enabled.

* Navigation: "Previous", "Next" buttons.

  • Step 3: Compute Configuration (e.g., EC2 Instances, VMs)

* Layout: A list/card view for adding multiple compute instances or groups.

* "Add Compute Instance" Dialog/Form:

* Fields: Instance Name, Instance Type (Dropdown), AMI/Image (Searchable Dropdown), Count, Key Pair (Dropdown/Upload), Security Groups (Multi-select), Subnet (Dropdown), User Data (Textarea), Tags (Key-Value pairs).

* Advanced Options (Collapsible): EBS Volumes, IAM Role, Monitoring.

* Interaction: Users can add multiple instances/groups, edit existing ones.

* Navigation: "Previous", "Next" buttons.

  • Step 4: Storage Configuration (e.g., S3 Buckets, EBS Volumes, Azure Blob Storage)

* Layout: Sections for different storage types (Object, Block, File).

* Section: Object Storage (e.g., S3 Bucket)

* Fields: Bucket Name, Region, ACL, Versioning (Toggle), Encryption (Dropdown), Lifecycle Rules (Optional).

* "Add Bucket" button.

* Section: Block Storage (e.g., EBS Volumes)

* Fields: Volume Name, Size (GB), Type (Dropdown), IOPS (if applicable), Encryption, Attached To (Dropdown - linking to compute instances).

* "Add Volume" button.

* Navigation: "Previous", "Next" buttons.

  • Step 5: Database Configuration (e.g., RDS, Azure SQL Database)

* Layout: A list/card view for adding multiple database instances.

* "Add Database" Dialog/Form:

* Fields: DB Instance Name, Engine (Dropdown), Version (Dropdown), Instance Class, Storage (GB), Username, Password, Subnet Group (Dropdown), Security Groups (Multi-select), Multi-AZ (Toggle), Backup Retention.

* Interaction: Users can add multiple DB instances.

* Navigation: "Previous", "Next" buttons.

  • Step 6: Review & Generate

* Layout: Two main panes: Configuration Summary (Left) and Terraform Code Preview (Right).

* Configuration Summary: A collapsible tree view or categorized list of all configured resources and their key attributes.

* Terraform Code Preview:

* Syntax-highlighted code editor displaying main.tf, variables.tf, outputs.tf, etc.

* Tabbed interface for different .tf files.

* Read-only (for preview), with a "Copy to Clipboard" button.

* Actions:

* "Download Terraform Files" button (downloads a ZIP archive).

* "Commit to Git" button (triggers a modal for Git repository details).

* "Save Draft" button.

* Navigation: "Previous" button.

C. Resource Editor / Detailed View (for existing projects)

  • Layout: Similar to wizard steps, but focused on a single resource or category.
  • Features: Allows editing of individual resource properties, adding/removing resources within a project.
  • Real-time Code Update: Changes in the form immediately reflect in the Terraform Code Preview pane.

4. Color Palette

A professional, tech-oriented color palette will be used, balancing corporate branding with clarity and readability.

  • Primary Brand Color: #007BFF (A vibrant, trustworthy blue - common in tech, can be replaced by PantheraHive's primary blue)
  • Secondary Accent Color: #28A745 (A confident green for success, positive actions)
  • Tertiary Accent Color: #FFC107 (An energetic yellow/orange for warnings, highlights)
  • Neutral Colors:

* Background: `#F8F9FA

terraform_infrastructure_build.md
Download as Markdown
Copy all content
Full output as text
Download ZIP
IDE-ready project ZIP
Copy share link
Permanent URL for this run
Get Embed Code
Embed this result on any website
Print / Save PDF
Use browser print dialog
\n\n\n"); var hasSrcMain=Object.keys(extracted).some(function(k){return k.indexOf("src/main")>=0;}); if(!hasSrcMain) zip.file(folder+"src/main."+ext,"import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n \n \n \n)\n"); var hasSrcApp=Object.keys(extracted).some(function(k){return k==="src/App."+ext||k==="App."+ext;}); if(!hasSrcApp) zip.file(folder+"src/App."+ext,"import React from 'react'\nimport './App.css'\n\nfunction App(){\n return(\n
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n
\n )\n}\nexport default App\n"); zip.file(folder+"src/index.css","*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#f0f2f5;color:#1a1a2e}\n.app{min-height:100vh;display:flex;flex-direction:column}\n.app-header{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px}\nh1{font-size:2.5rem;font-weight:700}\n"); zip.file(folder+"src/App.css",""); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/pages/.gitkeep",""); zip.file(folder+"src/hooks/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\n## Open in IDE\nOpen the project folder in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- Vue (Vite + Composition API + TypeScript) --- */ function buildVue(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "type": "module",\n "scripts": {\n "dev": "vite",\n "build": "vue-tsc -b && vite build",\n "preview": "vite preview"\n },\n "dependencies": {\n "vue": "^3.5.13",\n "vue-router": "^4.4.5",\n "pinia": "^2.3.0",\n "axios": "^1.7.9"\n },\n "devDependencies": {\n "@vitejs/plugin-vue": "^5.2.1",\n "typescript": "~5.7.3",\n "vite": "^6.0.5",\n "vue-tsc": "^2.2.0"\n }\n}\n'); zip.file(folder+"vite.config.ts","import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport { resolve } from 'path'\n\nexport default defineConfig({\n plugins: [vue()],\n resolve: { alias: { '@': resolve(__dirname,'src') } }\n})\n"); zip.file(folder+"tsconfig.json",'{"files":[],"references":[{"path":"./tsconfig.app.json"},{"path":"./tsconfig.node.json"}]}\n'); zip.file(folder+"tsconfig.app.json",'{\n "compilerOptions":{\n "target":"ES2020","useDefineForClassFields":true,"module":"ESNext","lib":["ES2020","DOM","DOM.Iterable"],\n "skipLibCheck":true,"moduleResolution":"bundler","allowImportingTsExtensions":true,\n "isolatedModules":true,"moduleDetection":"force","noEmit":true,"jsxImportSource":"vue",\n "strict":true,"paths":{"@/*":["./src/*"]}\n },\n "include":["src/**/*.ts","src/**/*.d.ts","src/**/*.tsx","src/**/*.vue"]\n}\n'); zip.file(folder+"env.d.ts","/// \n"); zip.file(folder+"index.html","\n\n\n \n \n "+slugTitle(pn)+"\n\n\n
\n \n\n\n"); var hasMain=Object.keys(extracted).some(function(k){return k==="src/main.ts"||k==="main.ts";}); if(!hasMain) zip.file(folder+"src/main.ts","import { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\nimport './assets/main.css'\n\nconst app = createApp(App)\napp.use(createPinia())\napp.mount('#app')\n"); var hasApp=Object.keys(extracted).some(function(k){return k.indexOf("App.vue")>=0;}); if(!hasApp) zip.file(folder+"src/App.vue","\n\n\n\n\n"); zip.file(folder+"src/assets/main.css","*{margin:0;padding:0;box-sizing:border-box}body{font-family:system-ui,sans-serif;background:#fff;color:#213547}\n"); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/views/.gitkeep",""); zip.file(folder+"src/stores/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\nOpen in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- Angular (v19 standalone) --- */ function buildAngular(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var sel=pn.replace(/_/g,"-"); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "scripts": {\n "ng": "ng",\n "start": "ng serve",\n "build": "ng build",\n "test": "ng test"\n },\n "dependencies": {\n "@angular/animations": "^19.0.0",\n "@angular/common": "^19.0.0",\n "@angular/compiler": "^19.0.0",\n "@angular/core": "^19.0.0",\n "@angular/forms": "^19.0.0",\n "@angular/platform-browser": "^19.0.0",\n "@angular/platform-browser-dynamic": "^19.0.0",\n "@angular/router": "^19.0.0",\n "rxjs": "~7.8.0",\n "tslib": "^2.3.0",\n "zone.js": "~0.15.0"\n },\n "devDependencies": {\n "@angular-devkit/build-angular": "^19.0.0",\n "@angular/cli": "^19.0.0",\n "@angular/compiler-cli": "^19.0.0",\n "typescript": "~5.6.0"\n }\n}\n'); zip.file(folder+"angular.json",'{\n "$schema": "./node_modules/@angular/cli/lib/config/schema.json",\n "version": 1,\n "newProjectRoot": "projects",\n "projects": {\n "'+pn+'": {\n "projectType": "application",\n "root": "",\n "sourceRoot": "src",\n "prefix": "app",\n "architect": {\n "build": {\n "builder": "@angular-devkit/build-angular:application",\n "options": {\n "outputPath": "dist/'+pn+'",\n "index": "src/index.html",\n "browser": "src/main.ts",\n "tsConfig": "tsconfig.app.json",\n "styles": ["src/styles.css"],\n "scripts": []\n }\n },\n "serve": {"builder":"@angular-devkit/build-angular:dev-server","configurations":{"production":{"buildTarget":"'+pn+':build:production"},"development":{"buildTarget":"'+pn+':build:development"}},"defaultConfiguration":"development"}\n }\n }\n }\n}\n'); zip.file(folder+"tsconfig.json",'{\n "compileOnSave": false,\n "compilerOptions": {"baseUrl":"./","outDir":"./dist/out-tsc","forceConsistentCasingInFileNames":true,"strict":true,"noImplicitOverride":true,"noPropertyAccessFromIndexSignature":true,"noImplicitReturns":true,"noFallthroughCasesInSwitch":true,"paths":{"@/*":["src/*"]},"skipLibCheck":true,"esModuleInterop":true,"sourceMap":true,"declaration":false,"experimentalDecorators":true,"moduleResolution":"bundler","importHelpers":true,"target":"ES2022","module":"ES2022","useDefineForClassFields":false,"lib":["ES2022","dom"]},\n "references":[{"path":"./tsconfig.app.json"}]\n}\n'); zip.file(folder+"tsconfig.app.json",'{\n "extends":"./tsconfig.json",\n "compilerOptions":{"outDir":"./dist/out-tsc","types":[]},\n "files":["src/main.ts"],\n "include":["src/**/*.d.ts"]\n}\n'); zip.file(folder+"src/index.html","\n\n\n \n "+slugTitle(pn)+"\n \n \n \n\n\n \n\n\n"); zip.file(folder+"src/main.ts","import { bootstrapApplication } from '@angular/platform-browser';\nimport { appConfig } from './app/app.config';\nimport { AppComponent } from './app/app.component';\n\nbootstrapApplication(AppComponent, appConfig)\n .catch(err => console.error(err));\n"); zip.file(folder+"src/styles.css","* { margin: 0; padding: 0; box-sizing: border-box; }\nbody { font-family: system-ui, -apple-system, sans-serif; background: #f9fafb; color: #111827; }\n"); var hasComp=Object.keys(extracted).some(function(k){return k.indexOf("app.component")>=0;}); if(!hasComp){ zip.file(folder+"src/app/app.component.ts","import { Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\n\n@Component({\n selector: 'app-root',\n standalone: true,\n imports: [RouterOutlet],\n templateUrl: './app.component.html',\n styleUrl: './app.component.css'\n})\nexport class AppComponent {\n title = '"+pn+"';\n}\n"); zip.file(folder+"src/app/app.component.html","
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n \n
\n"); zip.file(folder+"src/app/app.component.css",".app-header{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;gap:16px}h1{font-size:2.5rem;font-weight:700;color:#6366f1}\n"); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { provideRouter } from '@angular/router';\nimport { routes } from './app.routes';\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n provideRouter(routes)\n ]\n};\n"); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router';\n\nexport const routes: Routes = [];\n"); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nng serve\n# or: npm start\n\`\`\`\n\n## Build\n\`\`\`bash\nng build\n\`\`\`\n\nOpen in VS Code with Angular Language Service extension.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n.angular/\n"); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/m,"").trim(); var reqMap={"numpy":"numpy","pandas":"pandas","sklearn":"scikit-learn","tensorflow":"tensorflow","torch":"torch","flask":"flask","fastapi":"fastapi","uvicorn":"uvicorn","requests":"requests","sqlalchemy":"sqlalchemy","pydantic":"pydantic","dotenv":"python-dotenv","PIL":"Pillow","cv2":"opencv-python","matplotlib":"matplotlib","seaborn":"seaborn","scipy":"scipy"}; var reqs=[]; Object.keys(reqMap).forEach(function(k){if(src.indexOf("import "+k)>=0||src.indexOf("from "+k)>=0)reqs.push(reqMap[k]);}); var reqsTxt=reqs.length?reqs.join("\n"):"# add dependencies here\n"; zip.file(folder+"main.py",src||"# "+title+"\n# Generated by PantheraHive BOS\n\nprint(title+\" loaded\")\n"); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n\`\`\`\n\n## Run\n\`\`\`bash\npython main.py\n\`\`\`\n"); zip.file(folder+".gitignore",".venv/\n__pycache__/\n*.pyc\n.env\n.DS_Store\n"); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/m,"").trim(); var depMap={"mongoose":"^8.0.0","dotenv":"^16.4.5","axios":"^1.7.9","cors":"^2.8.5","bcryptjs":"^2.4.3","jsonwebtoken":"^9.0.2","socket.io":"^4.7.4","uuid":"^9.0.1","zod":"^3.22.4","express":"^4.18.2"}; var deps={}; Object.keys(depMap).forEach(function(k){if(src.indexOf(k)>=0)deps[k]=depMap[k];}); if(!deps["express"])deps["express"]="^4.18.2"; var pkgJson=JSON.stringify({"name":pn,"version":"1.0.0","main":"src/index.js","scripts":{"start":"node src/index.js","dev":"nodemon src/index.js"},"dependencies":deps,"devDependencies":{"nodemon":"^3.0.3"}},null,2)+"\n"; zip.file(folder+"package.json",pkgJson); var fallback="const express=require(\"express\");\nconst app=express();\napp.use(express.json());\n\napp.get(\"/\",(req,res)=>{\n res.json({message:\""+title+" API\"});\n});\n\nconst PORT=process.env.PORT||3000;\napp.listen(PORT,()=>console.log(\"Server on port \"+PORT));\n"; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000\n"); zip.file(folder+".gitignore","node_modules/\n.env\n.DS_Store\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\n\`\`\`\n\n## Run\n\`\`\`bash\nnpm run dev\n\`\`\`\n"); } /* --- Vanilla HTML --- */ function buildVanillaHtml(zip,folder,app,code){ var title=slugTitle(app); var isFullDoc=code.trim().toLowerCase().indexOf("=0||code.trim().toLowerCase().indexOf("=0; var indexHtml=isFullDoc?code:"\n\n\n\n\n"+title+"\n\n\n\n"+code+"\n\n\n\n"; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */\n*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e}\n"); zip.file(folder+"script.js","/* "+title+" — scripts */\n"); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Open\nDouble-click \`index.html\` in your browser.\n\nOr serve locally:\n\`\`\`bash\nnpx serve .\n# or\npython3 -m http.server 3000\n\`\`\`\n"); zip.file(folder+".gitignore",".DS_Store\nnode_modules/\n.env\n"); } /* ===== MAIN ===== */ var sc=document.createElement("script"); sc.src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"; sc.onerror=function(){ if(lbl)lbl.textContent="Download ZIP"; alert("JSZip load failed — check connection."); }; sc.onload=function(){ var zip=new JSZip(); var base=(_phFname||"output").replace(/\.[^.]+$/,""); var app=base.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"my_app"; var folder=app+"/"; var vc=document.getElementById("panel-content"); var panelTxt=vc?(vc.innerText||vc.textContent||""):""; var lang=detectLang(_phCode,panelTxt); if(_phIsHtml){ buildVanillaHtml(zip,folder,app,_phCode); } else if(lang==="flutter"){ buildFlutter(zip,folder,app,_phCode,panelTxt); } else if(lang==="react-native"){ buildReactNative(zip,folder,app,_phCode,panelTxt); } else if(lang==="swift"){ buildSwift(zip,folder,app,_phCode,panelTxt); } else if(lang==="kotlin"){ buildKotlin(zip,folder,app,_phCode,panelTxt); } else if(lang==="react"){ buildReact(zip,folder,app,_phCode,panelTxt); } else if(lang==="vue"){ buildVue(zip,folder,app,_phCode,panelTxt); } else if(lang==="angular"){ buildAngular(zip,folder,app,_phCode,panelTxt); } else if(lang==="python"){ buildPython(zip,folder,app,_phCode); } else if(lang==="node"){ buildNode(zip,folder,app,_phCode); } else { /* Document/content workflow */ var title=app.replace(/_/g," "); var md=_phAll||_phCode||panelTxt||"No content"; zip.file(folder+app+".md",md); var h=""+title+""; h+="

"+title+"

"; var hc=md.replace(/&/g,"&").replace(//g,">"); hc=hc.replace(/^### (.+)$/gm,"

$1

"); hc=hc.replace(/^## (.+)$/gm,"

$1

"); hc=hc.replace(/^# (.+)$/gm,"

$1

"); hc=hc.replace(/\*\*(.+?)\*\*/g,"$1"); hc=hc.replace(/\n{2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\nFiles:\n- "+app+".md (Markdown)\n- "+app+".html (styled HTML)\n"); } zip.generateAsync({type:"blob"}).then(function(blob){ var a=document.createElement("a"); a.href=URL.createObjectURL(blob); a.download=app+".zip"; a.click(); URL.revokeObjectURL(a.href); if(lbl)lbl.textContent="Download ZIP"; }); }; document.head.appendChild(sc); } function phShare(){navigator.clipboard.writeText(window.location.href).then(function(){var el=document.getElementById("ph-share-lbl");if(el){el.textContent="Link copied!";setTimeout(function(){el.textContent="Copy share link";},2500);}});}function phEmbed(){var runId=window.location.pathname.split("/").pop().replace(".html","");var embedUrl="https://pantherahive.com/embed/"+runId;var code='';navigator.clipboard.writeText(code).then(function(){var el=document.getElementById("ph-embed-lbl");if(el){el.textContent="Embed code copied!";setTimeout(function(){el.textContent="Get Embed Code";},2500);}});}