/**
 * Infrastructure Generator
 * Generates CloudFormation templates from cloud.config.ts using all Phase 2 modules
 */
import type { CloudConfig } from '@ts-cloud/core';
import { TemplateBuilder } from '@ts-cloud/core';
export interface GenerationOptions {
    config: CloudConfig;
    environment: 'production' | 'staging' | 'development';
    modules?: string[];
}
export declare class InfrastructureGenerator {
    private builder;
    private config;
    private environment;
    private mergedConfig;
    private serverEipLogicalIds;
    constructor(options: GenerationOptions);
    /**
     * Merge base config with environment-specific overrides
     */
    private mergeEnvironmentConfig;
    /**
     * Check if a resource should be deployed based on conditions
     */
    private shouldDeploy;
    private resolveApiOriginPort;
    private defaultComputeCachePathPatterns;
    private shouldRouteStorageBucketToCompute;
    private resolveComputeCachePathPatterns;
    private createComputeCacheBehavior;
    private appendComputeAppOrigin;
    /**
     * Build a Caddyfile from the sites config. Returns undefined when no
     * site has a `domain` (Caddy install is then skipped — useful for
     * staging EC2 boxes accessed by raw IP).
     *
     * Sites sharing a `domain` collapse into a single block. Within that
     * block, sites with an explicit `path` get `handle <path>` blocks
     * (ordered most-specific first so prefix matches take priority); a
     * site with no `path` (or `path: '/'`) becomes the bare catch-all
     * `handle` at the end.
     */
    private buildCaddyfile;
    private normalizeMountPath;
    private storageBucketLogicalId;
    private pathMountRewriteFunctionCode;
    /**
     * Generate complete infrastructure
     * Auto-detects what to generate based on configuration
     */
    generate(): this;
    /**
     * Apply global tags to all resources
     */
    private applyGlobalTags;
    /**
     * Generate VPC/Network infrastructure required by ECS/Fargate
     */
    private generateNetworkInfrastructure;
    /**
     * Generate ECS/Fargate container infrastructure
     * Creates ECS Cluster, Task Definition, Service, ALB, Security Groups, IAM roles, etc.
     */
    private generateContainerInfrastructure;
    /**
     * Generate serverless infrastructure (Lambda, ECS Fargate)
     */
    private generateServerless;
    /**
     * Generate server infrastructure (EC2)
     * Creates a full stack per server: EC2 instance + security group + IAM role + instance profile + EIP
     */
    private generateServer;
    /**
     * Generate the new Forge-style EC2 app stack from `infrastructure.compute`.
     *
     * Creates:
     *  - A deploy staging S3 bucket (`<slug>-<env>-deploy`) with 7-day lifecycle.
     *    Holds release tarballs that the EC2 instance pulls during `cloud deploy`.
     *  - An EC2 instance + IAM role + security group + EIP via Compute.createServerModeStack().
     *  - User Data that bootstraps Bun, system packages, and a systemd `app.service` skeleton.
     *  - Tags on the EC2 instance (Project / Environment / Role / ManagedBy) so
     *    the deploy command can target by tag instead of instance ID.
     *
     * Triggered when `infrastructure.compute.start` is set (the signal that
     * "this compute is hosting an app, not just an opaque server").
     */
    private generateComputeApp;
    /**
     * Generate jump box / bastion host infrastructure
     */
    private generateJumpBox;
    /**
     * Generate shared infrastructure (storage, database, etc.)
     */
    private generateSharedInfrastructure;
    /**
     * Generate Realtime (WebSocket) infrastructure
     * Creates API Gateway WebSocket API, Lambda handlers, DynamoDB tables
     */
    private generateRealtimeResources;
    /**
     * Generate $connect Lambda handler code
     */
    private generateConnectHandlerCode;
    /**
     * Generate $disconnect Lambda handler code
     */
    private generateDisconnectHandlerCode;
    /**
     * Generate $default (message) Lambda handler code
     */
    private generateMessageHandlerCode;
    /**
     * Generate Realtime Server Mode infrastructure (ts-broadcasting)
     * Creates ECS/EC2 resources for running the Bun WebSocket server
     */
    private generateRealtimeServerResources;
    /**
     * Generate broadcast.config.ts content for ts-broadcasting
     */
    generateBroadcastConfig(): string;
    /**
     * Generate YAML output
     */
    toYAML(): string;
    /**
     * Generate JSON output
     */
    toJSON(): string;
    /**
     * Get the template builder
     */
    getBuilder(): TemplateBuilder;
}
