File tree Expand file tree Collapse file tree 3 files changed +32
-32
lines changed
Expand file tree Collapse file tree 3 files changed +32
-32
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ locals {
2+ shared_tags = tomap (
3+ {
4+ " Name" = " ${ var . teamid } -${ var . prjid } " ,
5+ " team" = var.teamid,
6+ " project" = var.prjid
7+ }
8+ )
9+ }
Original file line number Diff line number Diff line change 11locals {
2- shared_tags = tomap (
3- {
4- " Name" = " ${ var . teamid } -${ var . prjid } " ,
5- " team" = var.teamid,
6- " project" = var.prjid
7- }
8- )
2+ default_input = { " sourceVersion" = var.branch, " timeoutInMinutesOverride" = var.timeout }
3+ event_input = var. custom_input == null ? local. default_input : var. custom_input
4+ }
5+
6+ resource "aws_cloudwatch_event_rule" "event_rule" {
7+ count = var. deploy_event_rule ? 1 : 0
8+
9+ name = var. name != null ? var. name : " ${ var . teamid } -${ var . prjid } "
10+ description = var. description == null ? " Terraform managed: ${ var . teamid } -${ var . prjid } " : var. description
11+ schedule_expression = var. schedule
12+ role_arn = var. service_role
13+
14+ tags = merge (local. shared_tags )
15+ }
16+
17+ resource "aws_cloudwatch_event_target" "event_target_input_type" {
18+ count = var. deploy_event_target ? 1 : 0
19+
20+ target_id = var. name != null ? var. name : " ${ var . teamid } -${ var . prjid } "
21+ rule = aws_cloudwatch_event_rule. event_rule . * . id [count . index ]
22+ arn = var. target_arn
23+ role_arn = var. service_role
24+ input = jsonencode (local. event_input )
925}
You can’t perform that action at this time.
0 commit comments