/** * AWS NestedStack — references a child project directory that builds * to an independent CloudFormation template. The parent emits * AWS::CloudFormation::Stack pointing at the child template. * * Cross-stack references are explicit: the child declares `stackOutput()` * exports, and the parent reads them via `nestedStack().outputs.name`. */ import { type ChildProjectInstance } from "@intentius/chant/child-project"; import { INTRINSIC_MARKER } from "@intentius/chant/intrinsic"; /** * Marker symbol for nested stack identification. */ export declare const NESTED_STACK_MARKER: unique symbol; /** * Options for configuring a nested stack. */ export interface NestedStackOptions { /** Explicit CloudFormation Parameters to pass to the child stack */ parameters?: Record; } /** * A reference to an output from a nested stack. * Serializes to `{ "Fn::GetAtt": [stackLogicalName, "Outputs.OutputName"] }`. */ export declare class NestedStackOutputRef { readonly [INTRINSIC_MARKER]: true; readonly stackName: string; readonly outputName: string; constructor(stackName: string, outputName: string); toJSON(): { "Fn::GetAtt": [string, string]; }; } /** * Type guard for NestedStackOutputRef. */ export declare function isNestedStackOutputRef(value: unknown): value is NestedStackOutputRef; /** * Extended ChildProjectInstance with AWS-specific marker. */ export interface NestedStackInstance extends ChildProjectInstance { readonly [NESTED_STACK_MARKER]: true; } /** * Type guard for NestedStackInstance. */ export declare function isNestedStackInstance(value: unknown): value is NestedStackInstance; /** * Create a nested stack that references a child project directory. * * The child directory must contain its own resource files. * It can be built independently with `chant build`. Cross-stack outputs * are declared in the child via `stackOutput()`. * * @param name - Logical name for the nested stack resource * @param projectPath - Absolute path to the child project directory * @param options - Optional parameters to pass to the child stack * @returns A ChildProjectInstance with an `outputs` proxy for cross-stack refs * * @example * ```ts * const network = _.nestedStack("network", import.meta.dirname + "/network", { * parameters: { Environment: "prod" }, * }); * * export const handler = new _.Function({ * vpcConfig: { * subnetIds: [network.outputs.subnetId], // cross-stack ref * }, * }); * ``` */ export declare function nestedStack(name: string, projectPath: string, options?: NestedStackOptions): NestedStackInstance; //# sourceMappingURL=nested-stack.d.ts.map