-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
elb_target_group: Add support for protocol_version parameter (#1496)
elb_target_group: Add support for protocol_version parameter SUMMARY Added support for protocol_version param in elb_target_group. Fixes 1422. ISSUE TYPE Feature Pull Request COMPONENT NAME elb_target_group Reviewed-by: Gonéri Le Bouder <[email protected]> Reviewed-by: Sharvari Khedkar <None> Reviewed-by: Markus Bergholz <[email protected]>
- Loading branch information
1 parent
1e95b7f
commit 02bbc54
Showing
4 changed files
with
111 additions
and
4 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
changelogs/fragments/1496-elb_target_group-add-protocol_version-support.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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
minor_changes: | ||
- elb_target_group - add support for ``protocol_version`` parameter (https://github.com/ansible-collections/community.aws/pull/1496). |
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
77 changes: 77 additions & 0 deletions
77
tests/integration/targets/elb_target/tasks/etg_protocol_version.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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
- name: Run elb_target_group protocol_version tests | ||
block: | ||
|
||
# ===================================================================== | ||
- name: set up testing VPC | ||
ec2_vpc_net: | ||
name: "{{ resource_prefix }}-etg-protocol-version-vpc" | ||
state: present | ||
cidr_block: 20.0.0.0/16 | ||
tags: | ||
Name: "{{ resource_prefix }}-etg-protocol-version-vpc" | ||
Description: "Created by ansible-test" | ||
register: vpc | ||
|
||
# ===================================================================== | ||
- name: Create a target group with protocol_version 'GRPC' | ||
community.aws.elb_target_group: | ||
name: "{{ elb_target_group_name }}" | ||
protocol: http | ||
port: 80 | ||
vpc_id: "{{ vpc.vpc.id }}" | ||
protocol_version: GRPC | ||
state: present | ||
register: create_result | ||
|
||
- assert: | ||
that: | ||
- create_result is changed | ||
- create_result is not failed | ||
- create_result.protocol_version == "GRPC" | ||
- create_result.protocol == "HTTP" | ||
- create_result.port == 80 | ||
|
||
- name: Create a target group with protocol_version 'GRPC' (idempotence) | ||
community.aws.elb_target_group: | ||
name: "{{ elb_target_group_name }}" | ||
protocol: http | ||
port: 80 | ||
vpc_id: "{{ vpc.vpc.id }}" | ||
protocol_version: GRPC | ||
state: present | ||
register: create_result | ||
|
||
- assert: | ||
that: | ||
- create_result is not changed | ||
- create_result is not failed | ||
- create_result.protocol_version == "GRPC" | ||
- create_result.protocol == "HTTP" | ||
- create_result.port == 80 | ||
|
||
# ===================================================================== | ||
|
||
always: | ||
- name: Remove elb target group | ||
elb_target_group: | ||
name: "{{ elb_target_group_name }}" | ||
state: absent | ||
ignore_errors: true | ||
register: deletion_result | ||
|
||
- name: remove testing VPC | ||
ec2_vpc_net: | ||
name: "{{ resource_prefix }}-etg-protocol-version-vpc" | ||
cidr_block: 20.0.0.0/16 | ||
state: absent | ||
register: removed | ||
retries: 10 | ||
until: removed is not failed | ||
ignore_errors: true | ||
|
||
- name: Ensure elb_target_group deletion | ||
assert: | ||
that: | ||
- deletion_result is changed | ||
- deletion_result is not failed |
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