Skip to content

Commit 6235745

Browse files
committed
feat: Add support for EventBridge Schedule mode
1 parent 1066edc commit 6235745

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

examples/schedule/main.tf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,20 @@ module "cloud_custodian_lambda" {
120120
regions = [local.region]
121121

122122
execution_options = {
123-
output_dir = "s3://${module.cloud_custodian_s3.s3_bucket_id}/output"
123+
# Not really required but if you run custodian run you need to specify -s/--output-dir you'd then have execution-options
124+
# as part of the config.json with the output_dir that was specified
125+
"output_dir" = "s3://${local.prefix}periodic-${local.account_id}/output?region=${local.region}"
124126
}
125127

126-
policies = templatefile("${path.module}/templates/policies.yaml.tpl", {
128+
policies = templatefile("${path.module}/templates/policy.yaml.tpl", {
127129
prefix = local.prefix
128130
account_id = local.account_id
129131
})
130132

131133
depends_on = [
134+
module.cloud_custodian_s3,
132135
aws_iam_role.custodian,
133136
aws_iam_role.scheduler,
134-
module.cloud_custodian_s3,
135137
aws_scheduler_schedule_group.custodian,
136138
]
137139
}
File renamed without changes.

main.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,6 @@ resource "aws_lambda_permission" "schedule" {
231231
}
232232
}
233233

234-
data "aws_caller_identity" "current" {}
235-
236234
data "external" "cloudwatch_event" {
237235
count = local.cloudwatch_event_mode ? 1 : 0
238236
program = [

0 commit comments

Comments
 (0)