-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
54 lines (54 loc) · 1.64 KB
/
serverless.yml
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
service: serverless-gong
frameworkVersion: '>=1.4.0 <2.0.0'
provider:
name: aws
runtime: nodejs12.x
iamRoleStatements:
- Effect: Allow
Action:
- xray:PutTraceSegments
- xray:PutTelemetryRecords
- xray:GetSamplingRules
- xray:GetSamplingTargets
- xray:GetSamplingStatisticSummaries
Resource: '*'
functions:
handleGong:
handler: index.handler
description:
Fn::Sub:
- 'Stackery Stack #{StackeryStackTagName} Environment #{StackeryEnvironmentTagName} Function #{ResourceName}'
- ResourceName: handleGong
events:
- http:
path: /webhook
method: POST
environment:
GITHUB_WEBHOOK_SECRET:
Ref: StackeryEnvConfiggithubSecretAsString
SLACK_WEBHOOK_URL:
Ref: StackeryEnvConfigslackWebhookURLAsString
runtime: nodejs12.x
timeout: 30
resources:
Parameters:
StackeryStackTagName:
Type: String
Description: Stack Name (injected by Stackery at deployment time)
Default: serverless-gong
StackeryEnvironmentTagName:
Type: String
Description: Environment Name (injected by Stackery at deployment time)
Default: dev
StackeryEnvConfiggithubSecretAsString:
Type: AWS::SSM::Parameter::Value<String>
Default: /<EnvironmentName>/githubSecret
StackeryEnvConfigslackWebhookURLAsString:
Type: AWS::SSM::Parameter::Value<String>
Default: /<EnvironmentName>/slackWebhookURL
Metadata:
EnvConfigParameters:
StackeryEnvConfiggithubSecretAsString: githubSecret
StackeryEnvConfigslackWebhookURLAsString: slackWebhookURL
plugins:
- serverless-cf-vars