Skip to content

Commit

Permalink
Configure schedule (#52)
Browse files Browse the repository at this point in the history
Ability to configure CA schedule
  • Loading branch information
paulschwarzenberger authored Mar 15, 2024
1 parent 593bc11 commit 628178d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
11 changes: 6 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,14 @@ module "scheduler-role" {
}

module "scheduler" {
# triggers step function once per day
# triggers step function once per day by default
source = "./modules/terraform-aws-ca-scheduler"

project = var.project
env = var.env
role_arn = module.scheduler-role.lambda_role_arn
target_arn = module.step-function.state_machine_arn
project = var.project
env = var.env
role_arn = module.scheduler-role.lambda_role_arn
target_arn = module.step-function.state_machine_arn
schedule_expression = var.schedule_expression
}

module "db-reader-role" {
Expand Down
1 change: 0 additions & 1 deletion modules/terraform-aws-ca-scheduler/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ variable "target_arn" {

variable "schedule_expression" {
description = "Schedule in supported format"
default = "cron(15 8 * * ? *)" # 8.15 a.m. daily
}

variable "group_name" {
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ variable "s3_aws_principals" {
default = []
}

variable "schedule_expression" {
description = "Step function schedule in supported format, must be carefully synchronised with CRL schedule and timing"
default = "cron(15 8 * * ? *)" # 8.15 a.m. daily
}

variable "subscription_filter_destination" {
description = "CloudWatch log subscription filter destination, last section of ARN"
default = ""
Expand Down

0 comments on commit 628178d

Please sign in to comment.