-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-parameters.yaml
129 lines (120 loc) · 4.17 KB
/
create-parameters.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
AWSTemplateFormatVersion: '2010-09-09'
Description: Slack Grim Reaper - Load Parameters
Parameters:
stage:
Type: String
AllowedValues:
- alpha
- beta
- prod
Default: alpha
Description: Enter alpha, beta or prod to designate the deployment stage/environment
slackBotToken:
Type: String
NoEcho: true
Default: xoxb-xxxx
Description: Slack Bot Token
slackAdminToken:
Type: String
NoEcho: true
Default: xoxp-xxxx
Description: Slack Admin User Token
slackSigningSecret:
Type: String
NoEcho: true
Default: 1234567890
Description: Slack Signing Secret
slackChannel:
Type: String
Default: CCCCCCCCC
Description: Slack Channel Id
azureTenantId:
Type: String
Default: 0a000000-0a00-0a00-0a00-0a0000000000
Description: Azure Tenant Id
azureClientId:
Type: String
Default: 0a000000-0a00-0a00-0a00-0a0000000000
Description: Azure Client Id
azureClientSecret:
Type: String
NoEcho: true
Default: xxxxxxxxxxxxxxxxxx
Description: Azure Client Secret
Resources:
###
# SSM Parameter Store
###
parameterSlackChannel:
Type: "AWS::SSM::Parameter"
Properties:
Name: !Join [ "/", [ "/slack", "grim-reaper", !Ref stage, "slackChannel" ] ]
Type: "String"
Value: !Ref slackChannel
Description: "Slack Channel Name"
AllowedPattern: "^[A-Z0-9]{9}$"
Tags:
appName: Slack Grim Reaper
parameterAzureClientId:
Type: "AWS::SSM::Parameter"
Properties:
Name: !Join [ "/", [ "/slack", "grim-reaper", !Ref stage, "azureClientId" ] ]
Type: "String"
Value: !Ref azureClientId
Description: "Azure Client Id"
AllowedPattern: "(\\{){0,1}[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}(\\}){0,1}"
Tags:
appName: Slack Grim Reaper
parameterAzureTenantId:
Type: "AWS::SSM::Parameter"
Properties:
Name: !Join [ "/", [ "/slack", "grim-reaper", !Ref stage, "azureTenantId" ] ]
Type: "String"
Value: !Ref azureTenantId
Description: "Azure Tenant Id"
AllowedPattern: "(\\{){0,1}[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}(\\}){0,1}"
Tags:
appName: Slack Grim Reaper
###
# Secrets Manager
###
secretsSlackBotToken:
Type: "AWS::SecretsManager::Secret"
Properties:
Name: !Join [ "/", [ "slack/grim-reaper", !Ref stage, "slackBotToken" ] ]
Description: "Slack Bot Token"
SecretString: !Sub '{"token":"${slackBotToken}"}'
Tags:
-
Key: appName
Value: Slack Grim Reaper
secretsSlackAdminToken:
Type: "AWS::SecretsManager::Secret"
Properties:
Name: !Join [ "/", [ "slack/grim-reaper", !Ref stage, "slackAdminToken" ] ]
Description: "Slack Admin Token"
SecretString: !Sub '{"token":"${slackAdminToken}"}'
Tags:
-
Key: appName
Value: Slack Grim Reaper
secretsSlackSigningSecret:
Type: "AWS::SecretsManager::Secret"
Properties:
Name: !Join [ "/", [ "slack/grim-reaper", !Ref stage, "slackSigningSecret" ] ]
Description: "Slack Signing Secret"
SecretString: !Sub '{"token":"${slackSigningSecret}"}'
Tags:
-
Key: appName
Value: Slack Grim Reaper
secretsAzureClientSecret:
Type: "AWS::SecretsManager::Secret"
Properties:
Name: !Join [ "/", [ "slack/grim-reaper", !Ref stage, "azureClientSecret" ] ]
Description: "Azure Client Secret"
SecretString: !Sub '{"token":"${azureClientSecret}"}'
Tags:
-
Key: appName
Value: Slack Grim Reaper