AWSTemplateFormatVersion: "2010-09-09" Description: (AWS Heidi) Root stack Parameters: isPrimaryRegion: Type: String Default: "Y" Description: Is this a primary region (Y/N) EventHealthBucket: Type: String Description: The name of the bucket that contains the ControlAccountStack YAML files PrincipalOrgID: Type: String Description: The AWS organization ID of the principal that is allowed to put events on the custom health event bus. QuickSightUser: Type: String Description: The QuickSight User that is allowed configure and manage the QS dashboard. e.g. Admin/sample-isgr, quicksightuser etc. QuicksightServiceRole: Type: String Default: aws-quicksight-service-role-v0 Description: The Quicksight Service role attached to QS, Default is aws-quicksight-service-role-v0 SageMakerEndpoint: Type: String Description: (Optional) Sagemaker endpoint for summarization model, leave blank if no summarization required. targetLang: Type: String Description: (Optional) Target language code(e.g. for English, en ), leave blank of no translation required. secondaryRegion: Type: String Description: (Optional) Enter name of secondary region, leave black if its single region deployment webhookSelected: Type: String Description: (Optional) Webhook Required?, leave black if not required datalakebucket: Type: String Description: (Optional) S3 bucket for dataLake, leave empty for no datalake setup. costSelected: Type: String Description: (Optional) Include last month cost(yes/no)?, leave black if not required. AllowedIpRange: Type: String Description: (Optional) AllowedIpRange for eventDetails url access, leave black if not required. Resources: HealtheventStorageStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://${EventHealthBucket}.s3.amazonaws.com/ControlAccountStack/storage-stack.yaml Parameters: secondaryRegion: !Ref secondaryRegion isPrimaryRegion: !Ref isPrimaryRegion HealtheventEventBusStack: Type: AWS::CloudFormation::Stack DependsOn: HealtheventStorageStack Properties: TemplateURL: !Sub https://${EventHealthBucket}.s3.amazonaws.com/ControlAccountStack/awseventbus-stack.yaml Parameters: POrgID: !Ref PrincipalOrgID IngestionStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://${EventHealthBucket}.s3.amazonaws.com/ControlAccountStack/ingestion-stack.yaml Parameters: DynamoDBArn: !GetAtt HealtheventStorageStack.Outputs.EventHealthDDBTableArn EventHealthBusArn: !GetAtt HealtheventEventBusStack.Outputs.EventHealthBusArn SageMakerEndpoint: !Ref SageMakerEndpoint EventHealthBucket: !Ref EventHealthBucket targetLang: !Ref targetLang costSelected: !Ref costSelected BackfillStack: DependsOn: IngestionStack Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://${EventHealthBucket}.s3.amazonaws.com/backfillStack/backfillEvents.yaml ConnectorStack: DependsOn: HealtheventEventBusStack Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://${EventHealthBucket}.s3.amazonaws.com/ControlAccountStack/connector-stack.yaml Parameters: DynamoDBArn: !GetAtt HealtheventStorageStack.Outputs.EventHealthDDBTableArn EventHealthBucket: !Ref EventHealthBucket QuickSightStack: DependsOn: IngestionStack Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://${EventHealthBucket}.s3.amazonaws.com/ControlAccountStack/quicksight-stack.yaml Parameters: AWSHealthEventDataCatalog: !GetAtt ConnectorStack.Outputs.AWSHealthEventDataCatalog QuickSightUser: !Ref QuickSightUser DynamoDBName: !GetAtt HealtheventStorageStack.Outputs.EventHealthDDBTable DDBConnectorARN: !GetAtt ConnectorStack.Outputs.DDBConnectorARN QuicksightServiceRole: !Ref QuicksightServiceRole EventHealthBucket: !Ref EventHealthBucket QuickSightAnalysisStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://${EventHealthBucket}.s3.amazonaws.com/ControlAccountStack/quicksight-analysis-stack.yaml Parameters: QuickSightUser: !Ref QuickSightUser AWSHealthEventQSDataSetArn: !GetAtt QuickSightStack.Outputs.AWSHealthEventQSDataSetArn EventDetailUrl: !If [ AllowedIpRange, !GetAtt EventDetailUrls.Outputs.EventDetailApiEndpoint, "https://test" ] WebhookStack: Condition: webhookSelected Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://${EventHealthBucket}.s3.amazonaws.com/webhook/restApiWebhook-stack.yaml Parameters: EventHealthBusArn: !GetAtt HealtheventEventBusStack.Outputs.EventHealthBusArn EventHealthDataLakeStack: Condition: datalakebucket Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://${EventHealthBucket}.s3.amazonaws.com/ControlAccountStack/datalake-stack.yaml Parameters: datalakebucket: !Ref datalakebucket EventDetailUrls: Condition: AllowedIpRange Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://${EventHealthBucket}.s3.amazonaws.com/eventDetailsUrl/restApiEventDetails-stack.yaml Parameters: DynamoDBArn: !GetAtt HealtheventStorageStack.Outputs.EventHealthDDBTableArn DynamoDBName: !GetAtt HealtheventStorageStack.Outputs.EventHealthDDBTable AllowedIpRange: !Ref AllowedIpRange Outputs: CentralHealthBusArn: Value: !GetAtt HealtheventEventBusStack.Outputs.EventHealthBusArn Export: Name: CentralHealthBusArn Conditions: webhookSelected: !Equals [!Ref webhookSelected, "yes"] datalakebucket: !Not [!Equals [!Ref datalakebucket, ""]] AllowedIpRange: !Not [!Equals [!Ref AllowedIpRange, ""]]