-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlambda.tf
25 lines (24 loc) · 1.12 KB
/
lambda.tf
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
resource "aws_cloudwatch_log_group" "slackConnector" {
name = "/aws/lambda/ukrops_slackConnector-${terraform.workspace}"
retention_in_days = 1
}
resource "aws_lambda_function" "slackConnector" {
filename = data.archive_file.lambda.output_path
function_name = "ukrops_slackConnector-${terraform.workspace}"
role = aws_iam_role.slackConnector.arn
handler = "slackConnectorBin"
source_code_hash = data.archive_file.lambda.output_base64sha256
timeout = 600
runtime = "go1.x"
environment {
variables = {
EMOJIBOT_BEST_CHANNEL_ID = local.current.best_channel_id
EMOJIBOT_SSM_SLACK_API_KEY_PATH = local.ssm.slack_api_key_path
EMOJIBOT_SSM_SLACK_API_LEGACY_KEY_PATH = local.ssm.legacy_slack_api_key_path
EMOJIBOT_SSM_SLACK_SIGN_SECRET_PATH = local.ssm.legacy_slack_sign_secret_path
EMOJIBOT_AWS_REGION = data.aws_region.current.name
EMOJIBOT_BEST_EMOJI_NAME = local.current.best_emoji_name
DEBUG = local.current.debug
}
}
}