-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
69 lines (60 loc) · 2.3 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: Slack Grim Reaper
Parameters:
stage:
Type: String
AllowedValues:
- alpha
- beta
- prod
Description: Enter alpha, beta or prod to designate the deployment stage/environment
Resources:
###
# Nested Stacks
###
nestedStackLambda:
Type: AWS::Serverless::Application
Properties:
Location: sam/cfn/cfn-lambda-functions.yaml
Parameters:
stage: !Ref stage
s3Bucket: !Ref s3Bucket
dynamodbTableUserProcessing: !GetAtt nestedStackDynamodb.Outputs.dynamodbTableUserProcessing
nestedStackApigateway:
Type: AWS::Serverless::Application
Properties:
Location: sam/cfn/cfn-api-gateways.yaml
Parameters:
stage: !Ref stage
functionSlackMessengerArn: !GetAtt nestedStackLambda.Outputs.functionSlackMessengerArn
nestedStackDynamodb:
Type: AWS::Serverless::Application
Properties:
Location: sam/cfn/cfn-dynamodb-tables.yaml
nestedStackStepfunctions:
Type: AWS::Serverless::Application
Properties:
Location: sam/cfn/cfn-stepfunctions-stepmachines.yaml
Parameters:
functionUserListArn: !GetAtt nestedStackLambda.Outputs.functionUserListArn
functionAdLookupArn: !GetAtt nestedStackLambda.Outputs.functionAdLookupArn
functionSummarizerArn: !GetAtt nestedStackLambda.Outputs.functionSummarizerArn
functionSlackMessengerArn: !GetAtt nestedStackLambda.Outputs.functionSlackMessengerArn
functionUserDeactivatorArn: !GetAtt nestedStackLambda.Outputs.functionUserDeactivatorArn
nestedStackCloudwatch:
Type: AWS::Serverless::Application
Properties:
Location: sam/cfn/cfn-cloudwatch.yaml
Parameters:
stage: !Ref stage
stateMachineGrimreaperArn: !GetAtt nestedStackStepfunctions.Outputs.stateMachineGrimreaperArn
###
# S3 Bucket
###
s3Bucket:
Type: AWS::S3::Bucket
Outputs:
slackGrimReaperRequestUrl:
Value: !GetAtt nestedStackApigateway.Outputs.slackGrimReaperRequestUrl
Description: Slack Request URL