Skip to content

Commit

Permalink
fix: Fixed newline handling in input_template (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko authored Feb 2, 2024
1 parent 83eb9bd commit 35a2acb
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.83.4
rev: v1.86.0
hooks:
- id: terraform_fmt
- id: terraform_validate
Expand All @@ -23,7 +23,7 @@ repos:
- '--args=--only=terraform_standard_module_structure'
- '--args=--only=terraform_workspace_remote'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: end-of-file-fixer
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ No modules.
| <a name="output_eventbridge_schedule_groups"></a> [eventbridge\_schedule\_groups](#output\_eventbridge\_schedule\_groups) | The EventBridge Schedule Groups created and their attributes |
| <a name="output_eventbridge_schedule_ids"></a> [eventbridge\_schedule\_ids](#output\_eventbridge\_schedule\_ids) | The EventBridge Schedule IDs created |
| <a name="output_eventbridge_schedules"></a> [eventbridge\_schedules](#output\_eventbridge\_schedules) | The EventBridge Schedules created and their attributes |
| <a name="output_eventbridge_targets"></a> [eventbridge\_targets](#output\_eventbridge\_targets) | The EventBridge Targets created and their attributes |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

## Authors
Expand Down
1 change: 1 addition & 0 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,5 @@ No inputs.
| <a name="output_eventbridge_rules"></a> [eventbridge\_rules](#output\_eventbridge\_rules) | The EventBridge Rules created and their attributes |
| <a name="output_eventbridge_schedule_groups"></a> [eventbridge\_schedule\_groups](#output\_eventbridge\_schedule\_groups) | The EventBridge Schedule Groups created and their attributes |
| <a name="output_eventbridge_schedules"></a> [eventbridge\_schedules](#output\_eventbridge\_schedules) | The EventBridge Schedules created and their attributes |
| <a name="output_eventbridge_targets"></a> [eventbridge\_targets](#output\_eventbridge\_targets) | The EventBridge Targets created and their attributes |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
2 changes: 1 addition & 1 deletion examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ locals {
input_paths = {
order_id = "$.detail.order_id"
}
input_template = <<EOF
input_template = <<-EOF
{
"id": <order_id>
}
Expand Down
5 changes: 5 additions & 0 deletions examples/complete/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ output "eventbridge_api_destinations" {
value = module.eventbridge.eventbridge_api_destinations
}

output "eventbridge_targets" {
description = "The EventBridge Targets created and their attributes"
value = module.eventbridge.eventbridge_targets
}

output "eventbridge_rules" {
description = "The EventBridge Rules created and their attributes"
value = module.eventbridge.eventbridge_rules
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ resource "aws_cloudwatch_event_target" "this" {

content {
input_paths = input_transformer.value.input_paths
input_template = input_transformer.value.input_template
input_template = chomp(input_transformer.value.input_template)
}
}

Expand Down
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ output "eventbridge_api_destinations" {
value = aws_cloudwatch_event_api_destination.this
}

output "eventbridge_targets" {
description = "The EventBridge Targets created and their attributes"
value = aws_cloudwatch_event_target.this
}

output "eventbridge_rules" {
description = "The EventBridge Rules created and their attributes"
value = aws_cloudwatch_event_rule.this
Expand Down

0 comments on commit 35a2acb

Please sign in to comment.