Skip to content

Commit 35a2acb

Browse files
authoredFeb 2, 2024··
fix: Fixed newline handling in input_template (#107)
1 parent 83eb9bd commit 35a2acb

File tree

7 files changed

+16
-4
lines changed

7 files changed

+16
-4
lines changed
 

‎.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.83.4
3+
rev: v1.86.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate
@@ -23,7 +23,7 @@ repos:
2323
- '--args=--only=terraform_standard_module_structure'
2424
- '--args=--only=terraform_workspace_remote'
2525
- repo: https://github.com/pre-commit/pre-commit-hooks
26-
rev: v4.4.0
26+
rev: v4.5.0
2727
hooks:
2828
- id: check-merge-conflict
2929
- id: end-of-file-fixer

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,7 @@ No modules.
569569
| <a name="output_eventbridge_schedule_groups"></a> [eventbridge\_schedule\_groups](#output\_eventbridge\_schedule\_groups) | The EventBridge Schedule Groups created and their attributes |
570570
| <a name="output_eventbridge_schedule_ids"></a> [eventbridge\_schedule\_ids](#output\_eventbridge\_schedule\_ids) | The EventBridge Schedule IDs created |
571571
| <a name="output_eventbridge_schedules"></a> [eventbridge\_schedules](#output\_eventbridge\_schedules) | The EventBridge Schedules created and their attributes |
572+
| <a name="output_eventbridge_targets"></a> [eventbridge\_targets](#output\_eventbridge\_targets) | The EventBridge Targets created and their attributes |
572573
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
573574

574575
## Authors

‎examples/complete/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,5 @@ No inputs.
8686
| <a name="output_eventbridge_rules"></a> [eventbridge\_rules](#output\_eventbridge\_rules) | The EventBridge Rules created and their attributes |
8787
| <a name="output_eventbridge_schedule_groups"></a> [eventbridge\_schedule\_groups](#output\_eventbridge\_schedule\_groups) | The EventBridge Schedule Groups created and their attributes |
8888
| <a name="output_eventbridge_schedules"></a> [eventbridge\_schedules](#output\_eventbridge\_schedules) | The EventBridge Schedules created and their attributes |
89+
| <a name="output_eventbridge_targets"></a> [eventbridge\_targets](#output\_eventbridge\_targets) | The EventBridge Targets created and their attributes |
8990
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

‎examples/complete/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ locals {
221221
input_paths = {
222222
order_id = "$.detail.order_id"
223223
}
224-
input_template = <<EOF
224+
input_template = <<-EOF
225225
{
226226
"id": <order_id>
227227
}

‎examples/complete/outputs.tf

+5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ output "eventbridge_api_destinations" {
3939
value = module.eventbridge.eventbridge_api_destinations
4040
}
4141

42+
output "eventbridge_targets" {
43+
description = "The EventBridge Targets created and their attributes"
44+
value = module.eventbridge.eventbridge_targets
45+
}
46+
4247
output "eventbridge_rules" {
4348
description = "The EventBridge Rules created and their attributes"
4449
value = module.eventbridge.eventbridge_rules

‎main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ resource "aws_cloudwatch_event_target" "this" {
228228

229229
content {
230230
input_paths = input_transformer.value.input_paths
231-
input_template = input_transformer.value.input_template
231+
input_template = chomp(input_transformer.value.input_template)
232232
}
233233
}
234234

‎outputs.tf

+5
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ output "eventbridge_api_destinations" {
135135
value = aws_cloudwatch_event_api_destination.this
136136
}
137137

138+
output "eventbridge_targets" {
139+
description = "The EventBridge Targets created and their attributes"
140+
value = aws_cloudwatch_event_target.this
141+
}
142+
138143
output "eventbridge_rules" {
139144
description = "The EventBridge Rules created and their attributes"
140145
value = aws_cloudwatch_event_rule.this

0 commit comments

Comments
 (0)
Please sign in to comment.