@@ -8,11 +8,21 @@ import {AwsSolutionsChecks} from "cdk-nag"
88import { getConfigFromEnvVar , getBooleanConfigFromEnvVar , calculateVersionedStackName } from "../config"
99
1010export interface StandardStackProps extends StackProps {
11+ /** Fully qualified stack name (potentially versioned). */
1112 readonly stackName : string
13+ /** Semantic version of the deployment (from `versionNumber`). */
1214 readonly version : string
15+ /** Git commit identifier baked into the stack. */
1316 readonly commitId : string
17+ /** Whether the stack originates from a pull-request environment. */
1418 readonly isPullRequest : boolean
19+ /** Logical environment identifier (for example `dev`, `prod`). */
1520 readonly environment : string
21+ /** CDK environment configuration used when synthesizing the stack. */
22+ readonly env : {
23+ /** AWS region targeted by the stack. */
24+ readonly region : string
25+ }
1626}
1727
1828export interface CreateAppParams {
@@ -27,6 +37,24 @@ export interface CreateAppParams {
2737 readonly serviceCategory ?: string
2838}
2939
40+ /**
41+ * Initialize a CDK `App` pre-loaded with NHS EPS tags and mandatory configuration.
42+ *
43+ * Reads stack metadata from environment variables, and returns
44+ * both the created `App` instance and the resolved stack props (including version info).
45+ *
46+ * @param params - High-level app metadata and optional deployment modifiers.
47+ * @param params.productName - Product tag value for the stack.
48+ * @param params.appName - Identifier used for `cdkApp` tagging.
49+ * @param params.repoName - Repository name stored on the stack tags.
50+ * @param params.driftDetectionGroup - Baseline drift detection tag (suffixes `-pull-request` when `isPullRequest`).
51+ * @param params.isStateless - Whether to version the stack name automatically (default `true`).
52+ * @param params.region - AWS region assigned to the stack environment (default `eu-west-2`).
53+ * @param params.projectType - Tag describing the project classification (default `Production`).
54+ * @param params.publicFacing - Public-facing classification tag (default `Y`).
55+ * @param params.serviceCategory - Service category tag (default `Platinum`).
56+ * @returns The constructed CDK `App` and the resolved stack props for downstream stacks.
57+ */
3058export function createApp ( {
3159 productName,
3260 appName,
0 commit comments