Skip to content

Commit 35165a9

Browse files
authored
Merge pull request #139 from co-cddo/feat/appregistry-resource-tags
feat: add awsApplication tag so resources appear in myApplications dashboard
2 parents e51d01a + b91f1e4 commit 35165a9

10 files changed

Lines changed: 105 additions & 0 deletions

File tree

cloudformation/scenarios/all-demo/template.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Resources:
4949
Value: council-chatbot
5050
- Key: ParentStack
5151
Value: !Ref 'AWS::StackName'
52+
- Key: awsApplication
53+
Value: !GetAtt AppRegistryApplication.Arn
5254

5355
FoiRedaction:
5456
Type: AWS::CloudFormation::Stack
@@ -64,6 +66,8 @@ Resources:
6466
Value: foi-redaction
6567
- Key: ParentStack
6668
Value: !Ref 'AWS::StackName'
69+
- Key: awsApplication
70+
Value: !GetAtt AppRegistryApplication.Arn
6771

6872
PlanningAi:
6973
Type: AWS::CloudFormation::Stack
@@ -79,6 +83,8 @@ Resources:
7983
Value: planning-ai
8084
- Key: ParentStack
8185
Value: !Ref 'AWS::StackName'
86+
- Key: awsApplication
87+
Value: !GetAtt AppRegistryApplication.Arn
8288

8389
QuicksightDashboard:
8490
Type: AWS::CloudFormation::Stack
@@ -94,6 +100,8 @@ Resources:
94100
Value: quicksight-dashboard
95101
- Key: ParentStack
96102
Value: !Ref 'AWS::StackName'
103+
- Key: awsApplication
104+
Value: !GetAtt AppRegistryApplication.Arn
97105

98106
SmartCarPark:
99107
Type: AWS::CloudFormation::Stack
@@ -109,6 +117,8 @@ Resources:
109117
Value: smart-car-park
110118
- Key: ParentStack
111119
Value: !Ref 'AWS::StackName'
120+
- Key: awsApplication
121+
Value: !GetAtt AppRegistryApplication.Arn
112122

113123
TextToSpeech:
114124
Type: AWS::CloudFormation::Stack
@@ -124,6 +134,8 @@ Resources:
124134
Value: text-to-speech
125135
- Key: ParentStack
126136
Value: !Ref 'AWS::StackName'
137+
- Key: awsApplication
138+
Value: !GetAtt AppRegistryApplication.Arn
127139

128140
LocalgovDrupal:
129141
Type: AWS::CloudFormation::Stack
@@ -138,6 +150,8 @@ Resources:
138150
Value: localgov-drupal
139151
- Key: ParentStack
140152
Value: !Ref 'AWS::StackName'
153+
- Key: awsApplication
154+
Value: !GetAtt AppRegistryApplication.Arn
141155

142156
# AppRegistry Application - visible in myApplications on the AWS Console
143157
# Parent application that groups all NDX:Try scenarios

cloudformation/scenarios/bops-planning/cdk/lib/bops-planning-stack.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ export class BopsPlanningStack extends cdk.Stack {
5858
resourceType: 'CFN_STACK',
5959
});
6060

61+
cdk.Tags.of(this).add('awsApplication', appRegistryApp.attrArn, {
62+
excludeResourceTypes: ['AWS::ServiceCatalogAppRegistry::Application', 'AWS::ServiceCatalogAppRegistry::ResourceAssociation'],
63+
});
64+
6165
// CloudFormation parameter for OS Maps API key (NoEcho)
6266
const osMapApiKeyParam = new cdk.CfnParameter(this, 'OSVectorTilesApiKey', {
6367
type: 'String',

cloudformation/scenarios/council-chatbot/template.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Resources:
5151
Value: council-chatbot
5252
- Key: AutoCleanup
5353
Value: 'true'
54+
- Key: awsApplication
55+
Value: !GetAtt AppRegistryApplication.Arn
5456

5557
# S3 Vectors storage for Knowledge Base embeddings
5658
KnowledgeBaseVectorBucket:
@@ -160,6 +162,8 @@ Resources:
160162
Value: ndx-try
161163
- Key: Scenario
162164
Value: council-chatbot
165+
- Key: awsApplication
166+
Value: !GetAtt AppRegistryApplication.Arn
163167

164168
# Guardrail Version
165169
CouncilGuardrailVersion:
@@ -231,6 +235,8 @@ Resources:
231235
Value: ndx-try
232236
- Key: Scenario
233237
Value: council-chatbot
238+
- Key: awsApplication
239+
Value: !GetAtt AppRegistryApplication.Arn
234240

235241
# Bedrock Knowledge Base with S3 Vectors storage
236242
CouncilKnowledgeBase:
@@ -253,6 +259,7 @@ Resources:
253259
Tags:
254260
Project: ndx-try
255261
Scenario: council-chatbot
262+
awsApplication: !GetAtt AppRegistryApplication.Arn
256263

257264
# S3 Data Source for Knowledge Base
258265
CouncilDataSource:
@@ -311,6 +318,8 @@ Resources:
311318
Value: ndx-try
312319
- Key: Scenario
313320
Value: council-chatbot
321+
- Key: awsApplication
322+
Value: !GetAtt AppRegistryApplication.Arn
314323

315324
# Seed Data Lambda Function
316325
SeedDataFunction:
@@ -1231,6 +1240,8 @@ Resources:
12311240
Value: ndx-try
12321241
- Key: Scenario
12331242
Value: council-chatbot
1243+
- Key: awsApplication
1244+
Value: !GetAtt AppRegistryApplication.Arn
12341245

12351246
# Seed Data Custom Resource
12361247
SeedData:
@@ -1288,6 +1299,8 @@ Resources:
12881299
Value: ndx-try
12891300
- Key: Scenario
12901301
Value: council-chatbot
1302+
- Key: awsApplication
1303+
Value: !GetAtt AppRegistryApplication.Arn
12911304

12921305
# Lambda Function - Chatbot Handler (Amazon Nova Pro with Knowledge Base + Guardrails)
12931306
ChatbotFunction:
@@ -1559,6 +1572,8 @@ Resources:
15591572
Value: ndx-try
15601573
- Key: Scenario
15611574
Value: council-chatbot
1575+
- Key: awsApplication
1576+
Value: !GetAtt AppRegistryApplication.Arn
15621577

15631578
# Lambda Function URL
15641579
ChatbotFunctionUrl:
@@ -1606,6 +1621,8 @@ Resources:
16061621
Value: ndx-try
16071622
- Key: Scenario
16081623
Value: council-chatbot
1624+
- Key: awsApplication
1625+
Value: !GetAtt AppRegistryApplication.Arn
16091626

16101627
# AppRegistry Application - visible in myApplications on the AWS Console
16111628
AppRegistryApplication:

cloudformation/scenarios/foi-redaction/template.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ Resources:
6666
Value: foi-redaction
6767
- Key: AutoCleanup
6868
Value: 'true'
69+
- Key: awsApplication
70+
Value: !GetAtt AppRegistryApplication.Arn
6971

7072
# IAM Role for Lambda
7173
RedactionRole:
@@ -107,6 +109,8 @@ Resources:
107109
Value: ndx-try
108110
- Key: Scenario
109111
Value: foi-redaction
112+
- Key: awsApplication
113+
Value: !GetAtt AppRegistryApplication.Arn
110114

111115
# Lambda Function - FOI Redaction
112116
RedactionFunction:
@@ -736,6 +740,8 @@ Resources:
736740
Value: ndx-try
737741
- Key: Scenario
738742
Value: foi-redaction
743+
- Key: awsApplication
744+
Value: !GetAtt AppRegistryApplication.Arn
739745

740746
# Lambda Function URL
741747
RedactionFunctionUrl:
@@ -782,6 +788,8 @@ Resources:
782788
Value: ndx-try
783789
- Key: Scenario
784790
Value: foi-redaction
791+
- Key: awsApplication
792+
Value: !GetAtt AppRegistryApplication.Arn
785793

786794
# AppRegistry Application - visible in myApplications on the AWS Console
787795
AppRegistryApplication:

cloudformation/scenarios/localgov-drupal/cdk/lib/localgov-drupal-stack.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ export class LocalGovDrupalStack extends cdk.Stack {
8787
resourceType: 'CFN_STACK',
8888
});
8989

90+
cdk.Tags.of(this).add('awsApplication', appRegistryApp.attrArn, {
91+
excludeResourceTypes: ['AWS::ServiceCatalogAppRegistry::Application', 'AWS::ServiceCatalogAppRegistry::ResourceAssociation'],
92+
});
93+
9094
// Story 1.4 - Networking construct (security groups)
9195
const networking = new NetworkingConstruct(this, 'Networking', {
9296
deploymentMode,

cloudformation/scenarios/planning-ai/template.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ Resources:
5959
Value: planning-ai
6060
- Key: AutoCleanup
6161
Value: 'true'
62+
- Key: awsApplication
63+
Value: !GetAtt AppRegistryApplication.Arn
6264

6365
# IAM Role for Lambda with Textract permissions
6466
PlanningAIRole:
@@ -111,6 +113,8 @@ Resources:
111113
Value: ndx-try
112114
- Key: Scenario
113115
Value: planning-ai
116+
- Key: awsApplication
117+
Value: !GetAtt AppRegistryApplication.Arn
114118

115119
# Lambda Function - Planning Document Analyzer with real Textract
116120
PlanningAnalyzerFunction:
@@ -1089,6 +1093,8 @@ Resources:
10891093
Value: ndx-try
10901094
- Key: Scenario
10911095
Value: planning-ai
1096+
- Key: awsApplication
1097+
Value: !GetAtt AppRegistryApplication.Arn
10921098

10931099
# Lambda Function URL
10941100
PlanningAnalyzerFunctionUrl:
@@ -1135,6 +1141,8 @@ Resources:
11351141
Value: ndx-try
11361142
- Key: Scenario
11371143
Value: planning-ai
1144+
- Key: awsApplication
1145+
Value: !GetAtt AppRegistryApplication.Arn
11381146

11391147
# AppRegistry Application - visible in myApplications on the AWS Console
11401148
AppRegistryApplication:

cloudformation/scenarios/quicksight-dashboard/template.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ Resources:
5555
Value: quicksight-dashboard
5656
- Key: AutoCleanup
5757
Value: 'true'
58+
- Key: awsApplication
59+
Value: !GetAtt AppRegistryApplication.Arn
5860

5961
# ============================================================================
6062
# S3 BUCKET POLICY - ALLOW QUICKSIGHT ACCESS
@@ -120,6 +122,8 @@ Resources:
120122
Value: ndx-try
121123
- Key: Scenario
122124
Value: quicksight-dashboard
125+
- Key: awsApplication
126+
Value: !GetAtt AppRegistryApplication.Arn
123127

124128
# ============================================================================
125129
# DATA GENERATOR LAMBDA FUNCTION
@@ -389,6 +393,8 @@ Resources:
389393
Value: ndx-try
390394
- Key: Scenario
391395
Value: quicksight-dashboard
396+
- Key: awsApplication
397+
Value: !GetAtt AppRegistryApplication.Arn
392398

393399
# ============================================================================
394400
# CLOUDWATCH LOG GROUP
@@ -403,6 +409,8 @@ Resources:
403409
Value: ndx-try
404410
- Key: Scenario
405411
Value: quicksight-dashboard
412+
- Key: awsApplication
413+
Value: !GetAtt AppRegistryApplication.Arn
406414

407415
# ============================================================================
408416
# CUSTOM RESOURCE - TRIGGER DATA GENERATION
@@ -478,6 +486,8 @@ Resources:
478486
Value: ndx-try
479487
- Key: Scenario
480488
Value: quicksight-dashboard
489+
- Key: awsApplication
490+
Value: !GetAtt AppRegistryApplication.Arn
481491

482492
QuickSightSetupFunction:
483493
Type: AWS::Lambda::Function
@@ -715,6 +725,8 @@ Resources:
715725
Value: ndx-try
716726
- Key: Scenario
717727
Value: quicksight-dashboard
728+
- Key: awsApplication
729+
Value: !GetAtt AppRegistryApplication.Arn
718730

719731
QuickSightSetupLogGroup:
720732
Type: AWS::Logs::LogGroup
@@ -726,6 +738,8 @@ Resources:
726738
Value: ndx-try
727739
- Key: Scenario
728740
Value: quicksight-dashboard
741+
- Key: awsApplication
742+
Value: !GetAtt AppRegistryApplication.Arn
729743

730744
QuickSightSetupTrigger:
731745
Type: AWS::CloudFormation::CustomResource
@@ -829,6 +843,8 @@ Resources:
829843
Value: ndx-try
830844
- Key: Scenario
831845
Value: quicksight-dashboard
846+
- Key: awsApplication
847+
Value: !GetAtt AppRegistryApplication.Arn
832848

833849
QuickSightGroupSyncLogGroup:
834850
Type: AWS::Logs::LogGroup
@@ -899,6 +915,8 @@ Resources:
899915
Value: ndx-try
900916
- Key: Scenario
901917
Value: quicksight-dashboard
918+
- Key: awsApplication
919+
Value: !GetAtt AppRegistryApplication.Arn
902920

903921
# ============================================================================
904922
# QUICKSIGHT DATASOURCE - S3 MANIFEST (Story 25.2)
@@ -934,6 +952,8 @@ Resources:
934952
Value: ndx-try
935953
- Key: Scenario
936954
Value: quicksight-dashboard
955+
- Key: awsApplication
956+
Value: !GetAtt AppRegistryApplication.Arn
937957

938958
# ============================================================================
939959
# QUICKSIGHT DATASET - SPICE IMPORT (Story 25.3)
@@ -1017,6 +1037,8 @@ Resources:
10171037
Value: ndx-try
10181038
- Key: Scenario
10191039
Value: quicksight-dashboard
1040+
- Key: awsApplication
1041+
Value: !GetAtt AppRegistryApplication.Arn
10201042

10211043
# ============================================================================
10221044
# QUICKSIGHT DASHBOARD (Story 25.4)
@@ -1251,6 +1273,8 @@ Resources:
12511273
Value: ndx-try
12521274
- Key: Scenario
12531275
Value: quicksight-dashboard
1276+
- Key: awsApplication
1277+
Value: !GetAtt AppRegistryApplication.Arn
12541278

12551279
# AppRegistry Application - visible in myApplications on the AWS Console
12561280
AppRegistryApplication:

cloudformation/scenarios/simply-readable/cdk/lib/simply-readable-stack.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export class SimplyReadableStack extends cdk.Stack {
6464
},
6565
);
6666

67+
cdk.Tags.of(this).add("awsApplication", appRegistryApp.attrArn, {
68+
excludeResourceTypes: ["AWS::ServiceCatalogAppRegistry::Application", "AWS::ServiceCatalogAppRegistry::ResourceAssociation"],
69+
});
70+
6771
// ========================================================================
6872
// SERVER ACCESS LOGGING BUCKET (same as upstream DocTranStack)
6973
// ========================================================================

0 commit comments

Comments
 (0)