Skip to content

Commit

Permalink
fix: mq_broker creation with tags; closes #1832
Browse files Browse the repository at this point in the history
Signed-off-by: Ali AlKhalidi <[email protected]>
  • Loading branch information
alialkhalidi committed Jul 19, 2023
1 parent 80b3829 commit 5900cd2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/1832-mq_broker_tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- mq_broker - ensure broker is created with ``tags`` when passed (https://github.com/ansible-collections/community.aws/issues/1832).
1 change: 1 addition & 0 deletions plugins/modules/mq_broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@
"storage_type": "StorageType",
"subnet_ids": "SubnetIds",
"users": "Users",
"tags": "Tags",
}


Expand Down
2 changes: 2 additions & 0 deletions tests/integration/targets/mq/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ vpc_name: "{{ resource_prefix }}-vpc"
vpc_cidr: "10.0.0.0/16"
subnet_cidr: "10.0.1.0/24"
sg_name: "{{resource_prefix}}-sg"
tags:
workload_type: other
2 changes: 2 additions & 0 deletions tests/integration/targets/mq/tasks/broker_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
broker_name: "{{ broker_name }}"
security_groups: "{{ broker_sg_ids.split(',') }}"
subnet_ids: "{{ broker_subnet_ids.split(',') }}"
tags: "{{ tags }}"
register: result
- set_fact:
broker_id: "{{ result.broker['broker_id'] }}"
Expand All @@ -20,6 +21,7 @@
- result_c1.broker['broker_name'] == broker_name
- result_c1.broker['broker_state'] == 'CREATION_IN_PROGRESS'
- ( result_c1.broker['storage_type'] | upper ) == 'EFS'
- result_c1.broker['tags'] == tags
when: not ansible_check_mode
- debug:
msg: "Wait until broker {{ broker_name }} ({{ broker_id }}) enters running state. This may take several minutes"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/mq/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
- name: cleanup broker
include_tasks: broker_cleanup.yml

- include_tasks: env_cleanup.yml
- include_tasks: env_cleanup.yml

0 comments on commit 5900cd2

Please sign in to comment.