-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[PR #1355/5f0e10e7 backport][stable-4] cloudwatchevent_rule - Add argspec validation for targets This is a backport of PR #1355 as merged into main (5f0e10e). SUMMARY fixes: #201 Targets currently has minimal validation applied. Because of the way Ansible converts JSON strings to dicts/lists, then back to the Python format string representing the dicts/lists, unless we explicitly define a parameter is a JSON string they get corrupted. This also moves the new input_paths_map/input_template parameters under input_transformer. Because we've not released 4.1.0 yet this doesn't cause any breakage. This will make adding other target parameters simpler further down the road. (There's a lot that we don't support today) ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudwatchevent_rule ADDITIONAL INFORMATION Reviewed-by: Mark Chappell <None>
- Loading branch information
1 parent
4b94a62
commit 15b1249
Showing
4 changed files
with
115 additions
and
63 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
changelogs/fragments/623-cloudwatchevents_rule-support_input_transformer.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
minor_changes: | ||
- cloudwatchevent_rule - Added ``input_paths_map`` and ``input_template`` parameters to support ``input_transformer`` on CloudWatch event rule (https://github.com/ansible-collections/community.aws/pull/623). | ||
- cloudwatchevent_rule - Added ``targets.input_transformer.input_paths_map`` and ``targets.input_transformer.input_template`` parameters to | ||
support configuring on CloudWatch event rule input transformation (https://github.com/ansible-collections/community.aws/pull/623). | ||
- cloudwatchevent_rule - Applied validation of ``targets`` arguments (https://github.com/ansible-collections/community.aws/issues/201). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
tests/integration/targets/cloudwatchevent_rule/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
--- | ||
name_pattern: "cloudwatch_event_rule" | ||
unique_id: "{{ tiny_prefix }}" | ||
name_pattern: "cloudwatch_event_rule-{{ tiny_prefix }}" | ||
|
||
test_event_names: | ||
- "{{ name_pattern }}-{{ unique_id }}-1" | ||
- "{{ name_pattern }}-{{ unique_id }}-2" | ||
- "{{ name_pattern }}-1" | ||
- "{{ name_pattern }}-2" | ||
|
||
input_transformer_event_name: "{{ name_pattern }}-{{ unique_id }}-3" | ||
input_transformer_event_name: "{{ name_pattern }}-3" | ||
input_event_name: "{{ name_pattern }}-4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters