-
Notifications
You must be signed in to change notification settings - Fork 6
/
states.tf
27 lines (24 loc) · 1022 Bytes
/
states.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
26
27
resource "aws_sfn_state_machine" "runtask_states" {
name = "${var.name_prefix}-runtask-statemachine"
role_arn = aws_iam_role.runtask_states.arn
definition = templatefile("${path.module}/states/runtask_states.asl.json", {
resource_runtask_request = aws_lambda_function.runtask_request.arn
resource_runtask_fulfillment = aws_lambda_function.runtask_fulfillment.arn
resource_runtask_callback = aws_lambda_function.runtask_callback.arn
})
logging_configuration {
log_destination = "${aws_cloudwatch_log_group.runtask_states.arn}:*"
include_execution_data = true
level = "ERROR"
}
tracing_configuration {
enabled = true
}
tags = local.combined_tags
}
resource "aws_cloudwatch_log_group" "runtask_states" {
name = "/aws/vendedlogs/states/${var.name_prefix}-runtask-statemachine"
retention_in_days = var.cloudwatch_log_group_retention
kms_key_id = aws_kms_key.runtask_key.arn
tags = local.combined_tags
}