@@ -12,19 +12,37 @@ export interface StandardStackProps extends StackProps {
1212 readonly version : string
1313 readonly commitId : string
1414 readonly isPullRequest : boolean
15+ readonly environment : string
1516}
1617
17- export function createApp (
18- appName : string ,
19- repoName : string ,
20- driftDetectionGroup : string ,
21- isStateless : boolean = true ,
22- region : string = "eu-west-2"
23- ) : { app : App , props : StandardStackProps } {
18+ export interface CreateAppParams {
19+ readonly productName : string
20+ readonly appName : string
21+ readonly repoName : string
22+ readonly driftDetectionGroup : string
23+ readonly isStateless ?: boolean
24+ readonly region ?: string
25+ readonly projectType ?: string
26+ readonly publicFacing ?: string
27+ readonly serviceCategory ?: string
28+ }
29+
30+ export function createApp ( {
31+ productName,
32+ appName,
33+ repoName,
34+ driftDetectionGroup,
35+ isStateless = true ,
36+ region = "eu-west-2" ,
37+ projectType = "Production" ,
38+ publicFacing = "Y" ,
39+ serviceCategory = "Platinum"
40+ } : CreateAppParams ) : { app : App , props : StandardStackProps } {
2441 let stackName = getConfigFromEnvVar ( "stackName" )
2542 const versionNumber = getConfigFromEnvVar ( "versionNumber" )
2643 const commitId = getConfigFromEnvVar ( "commitId" )
2744 const isPullRequest = getBooleanConfigFromEnvVar ( "isPullRequest" )
45+ const environment = getConfigFromEnvVar ( "environment" )
2846 let cfnDriftDetectionGroup = driftDetectionGroup
2947 if ( isPullRequest ) {
3048 cfnDriftDetectionGroup += "-pull-request"
@@ -34,6 +52,20 @@ export function createApp(
3452
3553 Aspects . of ( app ) . add ( new AwsSolutionsChecks ( { verbose : true } ) )
3654
55+ Tags . of ( app ) . add ( "TagVersion" , "1" )
56+ Tags . of ( app ) . add ( "Programme" , "EPS" )
57+ Tags . of ( app ) . add ( "Product" , productName )
58+ Tags . of ( app ) . add ( "Owner" , "england.epssupport@nhs.net" )
59+ Tags . of ( app ) . add ( "CostCentre" , "128997" )
60+ Tags . of ( app ) . add ( "Customer" , "NHS England" )
61+ Tags . of ( app ) . add ( "data_classification" , "5" )
62+ Tags . of ( app ) . add ( "DataType" , "PII" )
63+ Tags . of ( app ) . add ( "Environment" , environment )
64+ Tags . of ( app ) . add ( "ProjectType" , projectType )
65+ Tags . of ( app ) . add ( "PublicFacing" , publicFacing )
66+ Tags . of ( app ) . add ( "ServiceCategory" , serviceCategory )
67+ Tags . of ( app ) . add ( "OnOffPattern" , "AlwaysOn" )
68+ Tags . of ( app ) . add ( "DeploymentTool" , "CDK" )
3769 Tags . of ( app ) . add ( "version" , versionNumber )
3870 Tags . of ( app ) . add ( "commit" , commitId )
3971 Tags . of ( app ) . add ( "stackName" , stackName )
@@ -54,7 +86,8 @@ export function createApp(
5486 stackName,
5587 version : versionNumber ,
5688 commitId,
57- isPullRequest
89+ isPullRequest,
90+ environment
5891 }
5992 }
6093}
0 commit comments