Skip to content

Commit 89b34af

Browse files
committed
Adding Reference Module
1 parent c362e4b commit 89b34af

File tree

5 files changed

+766
-2
lines changed

5 files changed

+766
-2
lines changed

data-collection/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ List of modules and objects collected:
4343
| `aws-feeds` | N/A | Data Collection Account | Collects Blog posts and News Feeds |
4444
| `quicksight` | [Amazon QuickSight](https://aws.amazon.com/quicksight/) | Data Collection Account | Collects QuickSight User and Group information in the Data Collection Account only |
4545
| `resilience-hub` | [AWS Resilince Hub](https://aws.amazon.com/resilience-hub/) | Linked Accounts | |
46-
46+
| `reference` | Various services | Data Collection Account | Collects reference data for other modules and dashboard to function |
4747

4848
### Deployment Overview
4949

data-collection/deploy/deploy-data-collection.yaml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Metadata:
4141
- IncludeServiceQuotasModule
4242
- IncludeEUCUtilizationModule
4343
- IncludeResilienceHubModule
44+
- IncludeReferenceModule
4445
- Label:
4546
default: 'EUC (End User Compute) Module Configuration'
4647
Parameters:
@@ -288,6 +289,11 @@ Parameters:
288289
Description: Collects AWS Resilience Hub data
289290
AllowedValues: ['yes', 'no']
290291
Default: 'no'
292+
IncludeReferenceModule:
293+
Type: String
294+
Description: Collects Reference data for other modules
295+
AllowedValues: ['yes', 'no']
296+
Default: 'no'
291297
Conditions:
292298
DeployTAModule: !Equals [ !Ref IncludeTAModule, "yes"]
293299
DeployRightsizingModule: !Equals [ !Ref IncludeRightsizingModule, "yes"]
@@ -339,7 +345,8 @@ Conditions:
339345
- ""
340346
ProdCFNTemplateUsed: !Equals [ !Ref CFNSourceBucket, 'aws-managed-cost-intelligence-dashboards' ]
341347
NeedDataBucketsKms: !Not [ !Equals [ !Ref DataBucketsKmsKeysArns, "" ] ]
342-
348+
DeployIncludeReferenceModule: !Equals [ !Ref IncludeReferenceModule, "yes"]
349+
343350
Resources:
344351
S3Bucket:
345352
Type: 'AWS::S3::Bucket'
@@ -1498,6 +1505,30 @@ Resources:
14981505
StepFunctionExecutionRoleARN: !GetAtt StepFunctionExecutionRole.Arn
14991506
SchedulerExecutionRoleARN: !GetAtt SchedulerExecutionRole.Arn
15001507

1508+
ReferenceModule:
1509+
Type: AWS::CloudFormation::Stack
1510+
Condition: DeployIncludeReferenceModule
1511+
Properties:
1512+
TemplateURL: !Sub "https://${CFNSourceBucket}.s3.${AWS::URLSuffix}/cfn/data-collection/v3.11.0/module-reference.yaml"
1513+
Parameters:
1514+
DatabaseName: !Ref DatabaseName
1515+
DataBucketsKmsKeysArns: !Ref DataBucketsKmsKeysArns
1516+
DestinationBucket: !Ref S3Bucket
1517+
DestinationBucketARN: !GetAtt S3Bucket.Arn
1518+
Schedule: !Ref ScheduleFrequent
1519+
GlueRoleARN: !GetAtt GlueRole.Arn
1520+
ResourcePrefix: !Ref ResourcePrefix
1521+
LambdaAnalyticsARN: !GetAtt LambdaAnalytics.Arn
1522+
CodeBucket: !If [ ProdCFNTemplateUsed, !FindInMap [RegionMap, !Ref "AWS::Region", CodeBucket], !Ref CFNSourceBucket ]
1523+
StepFunctionTemplate: !FindInMap [StepFunctionCode, standalone-state-machine, TemplatePath]
1524+
StepFunctionExecutionRoleARN: !GetAtt StepFunctionExecutionRole.Arn
1525+
SchedulerExecutionRoleARN: !GetAtt SchedulerExecutionRole.Arn
1526+
RegionsInScope:
1527+
Fn::If:
1528+
- RegionsInScopeIsEmpty
1529+
- !Sub "${AWS::Region}"
1530+
- !Join [ '', !Split [ ' ', !Ref RegionsInScope ] ] # remove spaces
1531+
15011532
AccountCollector:
15021533
Type: AWS::CloudFormation::Stack
15031534
Condition: DeployAccountCollector

0 commit comments

Comments
 (0)