community.aws
community.aws copied to clipboard
Extend cloudwatch params
SUMMARY
I want to be able to provide more parameters for targets in to cloudwatch_rule smodule. Currently, there is no way to define ECS LaunchType and NetworkConfiguration.
Closes: https://github.com/ansible-collections/community.aws/issues/143
ISSUE TYPE
- Feature Pull Request
COMPONENT NAME
cloudwatch_rule
ADDITIONAL INFORMATION
This is an example of task definition:
---
- hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Schedule for Foo
cloudwatchevent_rule:
name: run_foo
state: enabled
schedule_expression: "rate(60 minutes)"
targets:
- id: run-job-foo
arn: arn:aws:ecs:ap-southeast-2:123456789123:cluster/jobs-cluster
role_arn: arn:aws:iam::123456789123:role/ecsEventsRole
ecs_parameters:
launch_type: FARGATE
network_configuration:
awsvpc_configuration:
assign_public_ip: ENABLED
security_groups:
- sg-58519c0e3db6f851
subnets:
- subnet-0c4b66b1d07e4e0c
task_definition_arn: arn:aws:ecs:ap-southeast-2:123456789123:task-definition/task-to-run:1
task_count: 1
cc @jillr @jsdalton @s-hertel @tremble @wimnat click here for bot help
Hey @markuman , can you please check it again? I think I addressed the feedback items.
Hey guys, anything else I should improve here before it's good to merge? @markuman @tremble @jillr @wimnat
@duderamos do you have some time to fix the integration test as @jillr suggested?
Not related to this pr, but according to the yaml documentation of this module, input
and input_path
must become mutually_exclusive=(['input', 'input_path'])
in the argument specs.
Not related to this pr, but according to the yaml documentation of this module,
input
andinput_path
must becomemutually_exclusive=(['input', 'input_path'])
in the argument specs.
..because https://github.com/ansible-collections/community.aws/pull/354/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R358 this does not work and will always result in passing both, input
and input_path
to that api.
platform_version: "1.4.0"
is also missing in the integration test. without platform version, it fails.
Also the group
seems to be necessary.
@duderamos Since the cloudwatchevent_rule module has been migrated to https://github.com/ansible-collections/amazon.aws/blob/main/plugins/modules/cloudwatchevent_rule.py, could you please open the PR against https://github.com/ansible-collections/amazon.aws and address the suggested changes? Thank you.