Skip to content

Commit

Permalink
add hypercare eventbridge rule
Browse files Browse the repository at this point in the history
  • Loading branch information
adnahassan committed Oct 22, 2024
1 parent 2b724b0 commit c7ecf31
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions iac/main/resources/state-machine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@ StatemachineFailuerEventRule:
]
}
}
TopicRoutingPolicy:
Type: AWS::SNS::TopicPolicy
Expand Down Expand Up @@ -921,3 +922,35 @@ SplunkMigratedRawStageTransformProcessPythonGlueJob:
SecurityConfiguration: !Ref GlueSecurityConfig
Name: !Sub ${Environment}-dap-splunk-migration-raw-stage-transform-process
Role: !Ref GlueScriptsExecutionRole

HypercareAdjustedScheduleEventBridgeRule:
Type: AWS::Events::Rule
Properties:
Description: Rule to be enabled when rps require hypercare during onboarding
ScheduleExpression: "cron(0 5,12,15 * * ? *)"
Name: !Sub ${Environment}-dap-hypercare-adjusted-schedule-txma-statemachine-eventbridge-rule
State: DISABLED
Targets:
- Id: hypercare-adjusted-schedule-txma-statemachine
Arn: !Ref TxmaRawLayerConsolidatedSchemaProcessingStateMachine
RoleArn: !GetAtt HypercareAdjustedScheduleEventBridgeStateMachineInvokeRole.Arn

HypercareAdjustedScheduleEventBridgeStateMachineInvokeRole:
Type: AWS::IAM::Role
Properties:
RoleName: "HypercareAdjustedScheduleEventBridgeStateMachineInvokeRole"
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Principal:
Service: "events.amazonaws.com"
Action: "sts:AssumeRole"
Policies:
- PolicyName: "InvokeStepFunctionPolicy"
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Action: "states:StartExecution"
Resource: !Ref TxmaRawLayerConsolidatedSchemaProcessingStateMachine

0 comments on commit c7ecf31

Please sign in to comment.