-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
59 lines (56 loc) · 1.77 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
Slack KoT Bridge
Globals:
Function:
Timeout: 30
Parameters:
KotRecorderGatewayUrl:
Type: String
Default: https://s2.kingtime.jp/gateway/bprgateway
KotUserId:
Type: String
KotPassword:
Type: String
KotClockInText:
Type: String
Default: 出社
KotClockOutText:
Type: String
Default: 退社
SlackVerificationToken:
Type: String
SlackUserId:
Type: String
Description: Not user_id. e.g. U3M5XXVLN
SlackWatchingChannelId:
Type: String
Description: Not attendance. e.g. C3M5XXXU6
SlackReportingWebhook:
Type: String
Resources:
WebhookFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: bridge/
Handler: webhook.handler
Runtime: nodejs18.x
FunctionName: slack-kot-bridge-webhook
Environment:
Variables:
KOT_RECORDER_GATEWAY_URL: !Ref KotRecorderGatewayUrl
KOT_USER_ID: !Ref KotUserId
KOT_USER_PASSWORD: !Ref KotPassword
KOT_CLOCK_IN_TEXT: !Ref KotClockInText
KOT_CLOCK_OUT_TEXT: !Ref KotClockOutText
SLACK_VERIFICATION_TOKEN: !Ref SlackVerificationToken
SLACK_USER_ID: !Ref SlackUserId
SLACK_WATCHING_CHANNEL_ID: !Ref SlackWatchingChannelId
SLACK_REPORTING_WEBHOOK: !Ref SlackReportingWebhook
Events:
Webhook:
Type: Api
Properties:
Path: /webhook
Method: POST