From 69555ba7a0166136f42d7b8ba3fe71c47bc6c852 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Sun, 18 Sep 2022 19:05:09 -0700 Subject: [PATCH 01/17] Added support for protocol_version parameter --- plugins/modules/elb_target_group.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/plugins/modules/elb_target_group.py b/plugins/modules/elb_target_group.py index cd750be188b..e42ff7fd52c 100644 --- a/plugins/modules/elb_target_group.py +++ b/plugins/modules/elb_target_group.py @@ -89,6 +89,12 @@ required: false choices: [ 'http', 'https', 'tcp', 'tls', 'udp', 'tcp_udp', 'HTTP', 'HTTPS', 'TCP', 'TLS', 'UDP', 'TCP_UDP'] type: str + protocol_version: + description: + - Specifies protocol version. + required: false + choices: ['GRPC', 'HTTP1', 'HTTP2'] + type: str state: description: - Create or destroy the target group. @@ -216,6 +222,15 @@ vpc_id: vpc-01234567 state: present +- name: Create a target group with protocol_version 'GRPC' + community.aws.elb_target_group: + name: mytargetgroup + protocol: http + port: 80 + vpc_id: vpc-01234567 + protocol_version: GRPC + state: present + - name: Modify the target group with a custom health check community.aws.elb_target_group: name: mytargetgroup @@ -566,6 +581,7 @@ def create_or_update_target_group(connection, module): params['TargetType'] = target_type if target_type != "lambda": params['Protocol'] = module.params.get("protocol").upper() + params['ProtocolVersion'] = module.params.get('protocol_version') params['Port'] = module.params.get("port") params['VpcId'] = module.params.get("vpc_id") tags = module.params.get("tags") @@ -912,6 +928,7 @@ def main(): name=dict(required=True), port=dict(type='int'), protocol=dict(choices=protocols_list), + protocol_version=dict(type='str', choices=['GRPC', 'HTTP1', 'HTTP2']), purge_tags=dict(default=True, type='bool'), stickiness_enabled=dict(type='bool'), stickiness_type=dict(), From 5749bfd926b2860562dacf1443a63a3b33fb8db0 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Mon, 19 Sep 2022 13:12:58 -0700 Subject: [PATCH 02/17] Add condition to read param only if provided --- plugins/modules/elb_target_group.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/modules/elb_target_group.py b/plugins/modules/elb_target_group.py index e42ff7fd52c..a401cf599eb 100644 --- a/plugins/modules/elb_target_group.py +++ b/plugins/modules/elb_target_group.py @@ -581,7 +581,8 @@ def create_or_update_target_group(connection, module): params['TargetType'] = target_type if target_type != "lambda": params['Protocol'] = module.params.get("protocol").upper() - params['ProtocolVersion'] = module.params.get('protocol_version') + if module.params.get('protocol_version') is not None: + params['ProtocolVersion'] = module.params.get('protocol_version') params['Port'] = module.params.get("port") params['VpcId'] = module.params.get("vpc_id") tags = module.params.get("tags") From b2890aae4fc64ade2461f2e3998c2f5d2c41d16d Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Mon, 19 Sep 2022 13:39:02 -0700 Subject: [PATCH 03/17] Add changelogs fragment --- .../1496-elb_target_group-add-protocol_version-support.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/1496-elb_target_group-add-protocol_version-support.yml diff --git a/changelogs/fragments/1496-elb_target_group-add-protocol_version-support.yml b/changelogs/fragments/1496-elb_target_group-add-protocol_version-support.yml new file mode 100644 index 00000000000..cd16c526da0 --- /dev/null +++ b/changelogs/fragments/1496-elb_target_group-add-protocol_version-support.yml @@ -0,0 +1,2 @@ +minor_changes: + - elb_target_group - add support for ProtocolVersion param (https://github.com/ansible-collections/community.aws/pull/1496). \ No newline at end of file From cb7b291e581202c8f006b974722a468ffa358d46 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Mon, 19 Sep 2022 13:41:55 -0700 Subject: [PATCH 04/17] Adding new line at EOF --- .../1496-elb_target_group-add-protocol_version-support.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/1496-elb_target_group-add-protocol_version-support.yml b/changelogs/fragments/1496-elb_target_group-add-protocol_version-support.yml index cd16c526da0..993a593eb41 100644 --- a/changelogs/fragments/1496-elb_target_group-add-protocol_version-support.yml +++ b/changelogs/fragments/1496-elb_target_group-add-protocol_version-support.yml @@ -1,2 +1,2 @@ minor_changes: - - elb_target_group - add support for ProtocolVersion param (https://github.com/ansible-collections/community.aws/pull/1496). \ No newline at end of file + - elb_target_group - add support for ProtocolVersion param (https://github.com/ansible-collections/community.aws/pull/1496). From 8cc44c2287d91a854de5bdf0844074b2840ea736 Mon Sep 17 00:00:00 2001 From: radek bobrowicz Date: Sun, 25 Sep 2022 20:58:01 -0600 Subject: [PATCH 05/17] fix matcher for grpc healthchecks --- plugins/modules/elb_target_group.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/plugins/modules/elb_target_group.py b/plugins/modules/elb_target_group.py index a401cf599eb..42897b99c49 100644 --- a/plugins/modules/elb_target_group.py +++ b/plugins/modules/elb_target_group.py @@ -624,7 +624,11 @@ def create_or_update_target_group(connection, module): if module.params.get("successful_response_codes") is not None: params['Matcher'] = {} - params['Matcher']['HttpCode'] = module.params.get("successful_response_codes") + code_key = 'HttpCode' + protocol_version = module.params.get('protocol_version') + if protocol_version is not None and protocol_version.upper() == "GRPC": + code_key = 'GrpcCode' + params['Matcher'][code_key] = module.params.get("successful_response_codes") # Get target group target_group = get_target_group(connection, module) @@ -674,11 +678,14 @@ def create_or_update_target_group(connection, module): # Matcher (successful response codes) # TODO: required and here? if 'Matcher' in params: - current_matcher_list = target_group['Matcher']['HttpCode'].split(',') - requested_matcher_list = params['Matcher']['HttpCode'].split(',') + code_key = 'HttpCode' + if target_group['ProtocolVersion'] == 'GRPC': + code_key = 'GrpcCode' + current_matcher_list = target_group['Matcher'][code_key].split(',') + requested_matcher_list = params['Matcher'][code_key].split(',') if set(current_matcher_list) != set(requested_matcher_list): health_check_params['Matcher'] = {} - health_check_params['Matcher']['HttpCode'] = ','.join(requested_matcher_list) + health_check_params['Matcher'][code_key] = ','.join(requested_matcher_list) try: if health_check_params: From a67f4c0b90b5b3b4f2889b411a6cbeb3837e5c1d Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Sun, 2 Oct 2022 20:49:28 -0700 Subject: [PATCH 06/17] Minor fix in changelogs --- .../1496-elb_target_group-add-protocol_version-support.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/1496-elb_target_group-add-protocol_version-support.yml b/changelogs/fragments/1496-elb_target_group-add-protocol_version-support.yml index 993a593eb41..956dead2477 100644 --- a/changelogs/fragments/1496-elb_target_group-add-protocol_version-support.yml +++ b/changelogs/fragments/1496-elb_target_group-add-protocol_version-support.yml @@ -1,2 +1,2 @@ minor_changes: - - elb_target_group - add support for ProtocolVersion param (https://github.com/ansible-collections/community.aws/pull/1496). + - elb_target_group - add support for ``protocol_version`` parameter (https://github.com/ansible-collections/community.aws/pull/1496). From f972d0bf2ad742760ecd5e06bf1e7303aa3d1250 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Sun, 2 Oct 2022 22:24:08 -0700 Subject: [PATCH 07/17] Add version_added for protocol_version param --- plugins/modules/elb_target_group.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/modules/elb_target_group.py b/plugins/modules/elb_target_group.py index 42897b99c49..6c82707c3bc 100644 --- a/plugins/modules/elb_target_group.py +++ b/plugins/modules/elb_target_group.py @@ -95,6 +95,7 @@ required: false choices: ['GRPC', 'HTTP1', 'HTTP2'] type: str + version_added: 4.3.0 state: description: - Create or destroy the target group. From 0db7f4b2f2f588fbe554337a713d85c94b30c9f5 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Tue, 11 Oct 2022 12:39:50 -0700 Subject: [PATCH 08/17] Add integration tests --- .../elb_target/tasks/etg_protocol_version.yml | 47 +++++++++++++++++++ .../targets/elb_target/tasks/main.yml | 1 + 2 files changed, 48 insertions(+) create mode 100644 tests/integration/targets/elb_target/tasks/etg_protocol_version.yml diff --git a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml new file mode 100644 index 00000000000..091cb307fc5 --- /dev/null +++ b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml @@ -0,0 +1,47 @@ +- name: Create a target group with protocol_version 'GRPC' + community.aws.elb_target_group: + name: "{{ elb_target_group_name }}-protocol_version_test" + protocol: http + port: 80 + vpc_id: "{{ vpc.vpc.id }}" + protocol_version: GRPC + state: present + register: create_result + +- debug: msg="{{ create_result }}" + +- assert: + that: + - create_result is changed + - create_result is not failed + +- name: Create a target group with protocol_version 'GRPC' (idempotence) + community.aws.elb_target_group: + name: "{{ elb_target_group_name }}-protocol_version_test" + protocol: http + port: 80 + vpc_id: "{{ vpc.vpc.id }}" + protocol_version: GRPC + state: present + register: create_result + +- debug: msg="{{ create_result }}" + +- assert: + that: + - create_result is not changed + - create_result is not failed + + always: + - name: Remove elb target group + elb_target_group: + name: "{{ elb_target_group_name }}-protocol_version_test" + state: absent + ignore_errors: true + register: deletion_result + +- name: Ensure elb_target_group deletion + assert: + that: + - deletion_result is changed + - deletion_result is not failed diff --git a/tests/integration/targets/elb_target/tasks/main.yml b/tests/integration/targets/elb_target/tasks/main.yml index 10f7a9e5014..ce5bf3e635c 100644 --- a/tests/integration/targets/elb_target/tasks/main.yml +++ b/tests/integration/targets/elb_target/tasks/main.yml @@ -13,3 +13,4 @@ - include_tasks: ec2_target.yml - include_tasks: lambda_target.yml - include_tasks: alb_target.yml + - include_tasks: etg_protocol_version.yml From 72299ceae9b9e714654d9dc6c668bae2a8443895 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Tue, 11 Oct 2022 14:26:24 -0700 Subject: [PATCH 09/17] Moving etg_protocol_version tests up --- tests/integration/targets/elb_target/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/elb_target/tasks/main.yml b/tests/integration/targets/elb_target/tasks/main.yml index ce5bf3e635c..e99118c6408 100644 --- a/tests/integration/targets/elb_target/tasks/main.yml +++ b/tests/integration/targets/elb_target/tasks/main.yml @@ -10,7 +10,7 @@ - community.general - amazon.aws block: + - include_tasks: etg_protocol_version.yml - include_tasks: ec2_target.yml - include_tasks: lambda_target.yml - include_tasks: alb_target.yml - - include_tasks: etg_protocol_version.yml From c52db8bb8efcfc60334adf73317f2b6472da9af6 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Tue, 11 Oct 2022 16:36:43 -0700 Subject: [PATCH 10/17] Fix integration tests --- .../elb_target/tasks/etg_protocol_version.yml | 81 ++++++++++--------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml index 091cb307fc5..b73d63a480b 100644 --- a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml +++ b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml @@ -1,47 +1,50 @@ -- name: Create a target group with protocol_version 'GRPC' - community.aws.elb_target_group: - name: "{{ elb_target_group_name }}-protocol_version_test" - protocol: http - port: 80 - vpc_id: "{{ vpc.vpc.id }}" - protocol_version: GRPC - state: present - register: create_result +--- +- name: Run elb_target_group protocol_version tests + block: + - name: Create a target group with protocol_version 'GRPC' + community.aws.elb_target_group: + name: "{{ elb_target_group_name }}-protocol_version_test" + protocol: http + port: 80 + vpc_id: "{{ vpc.vpc.id }}" + protocol_version: GRPC + state: present + register: create_result -- debug: msg="{{ create_result }}" + - debug: msg="{{ create_result }}" -- assert: - that: - - create_result is changed - - create_result is not failed + - assert: + that: + - create_result is changed + - create_result is not failed -- name: Create a target group with protocol_version 'GRPC' (idempotence) - community.aws.elb_target_group: - name: "{{ elb_target_group_name }}-protocol_version_test" - protocol: http - port: 80 - vpc_id: "{{ vpc.vpc.id }}" - protocol_version: GRPC - state: present - register: create_result + - name: Create a target group with protocol_version 'GRPC' (idempotence) + community.aws.elb_target_group: + name: "{{ elb_target_group_name }}-protocol_version_test" + protocol: http + port: 80 + vpc_id: "{{ vpc.vpc.id }}" + protocol_version: GRPC + state: present + register: create_result -- debug: msg="{{ create_result }}" + - debug: msg="{{ create_result }}" -- assert: - that: - - create_result is not changed - - create_result is not failed + - assert: + that: + - create_result is not changed + - create_result is not failed always: - - name: Remove elb target group - elb_target_group: - name: "{{ elb_target_group_name }}-protocol_version_test" - state: absent - ignore_errors: true - register: deletion_result + - name: Remove elb target group + elb_target_group: + name: "{{ elb_target_group_name }}-protocol_version_test" + state: absent + ignore_errors: true + register: deletion_result -- name: Ensure elb_target_group deletion - assert: - that: - - deletion_result is changed - - deletion_result is not failed + - name: Ensure elb_target_group deletion + assert: + that: + - deletion_result is changed + - deletion_result is not failed From bfafd29bf392904a0dab19f8e41fd1708386bf4b Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Tue, 11 Oct 2022 17:04:33 -0700 Subject: [PATCH 11/17] Fix integration tests --- .../elb_target/tasks/etg_protocol_version.yml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml index b73d63a480b..6f7b9b07c5d 100644 --- a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml +++ b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml @@ -1,6 +1,19 @@ --- - 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_version_test" @@ -35,6 +48,8 @@ - create_result is not changed - create_result is not failed + # ===================================================================== + always: - name: Remove elb target group elb_target_group: @@ -43,6 +58,16 @@ 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: From 13ae836bac7f9acf19016eb05d63bd1dd0435738 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Tue, 11 Oct 2022 19:49:28 -0700 Subject: [PATCH 12/17] Renaming elb_target_group_name --- .../targets/elb_target/tasks/etg_protocol_version.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml index 6f7b9b07c5d..f87a98ed46f 100644 --- a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml +++ b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml @@ -16,7 +16,7 @@ # ===================================================================== - name: Create a target group with protocol_version 'GRPC' community.aws.elb_target_group: - name: "{{ elb_target_group_name }}-protocol_version_test" + name: "{{ elb_target_group_name }}" protocol: http port: 80 vpc_id: "{{ vpc.vpc.id }}" @@ -33,7 +33,7 @@ - name: Create a target group with protocol_version 'GRPC' (idempotence) community.aws.elb_target_group: - name: "{{ elb_target_group_name }}-protocol_version_test" + name: "{{ elb_target_group_name }}" protocol: http port: 80 vpc_id: "{{ vpc.vpc.id }}" @@ -53,7 +53,7 @@ always: - name: Remove elb target group elb_target_group: - name: "{{ elb_target_group_name }}-protocol_version_test" + name: "{{ elb_target_group_name }}" state: absent ignore_errors: true register: deletion_result From c1832fe9ae239224d9a94632618bdb1426a107e3 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Wed, 12 Oct 2022 11:18:30 -0700 Subject: [PATCH 13/17] Update version_added for protocol_version param to 5.1.0 --- plugins/modules/elb_target_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/elb_target_group.py b/plugins/modules/elb_target_group.py index 6c82707c3bc..ed9f2c611e7 100644 --- a/plugins/modules/elb_target_group.py +++ b/plugins/modules/elb_target_group.py @@ -95,7 +95,7 @@ required: false choices: ['GRPC', 'HTTP1', 'HTTP2'] type: str - version_added: 4.3.0 + version_added: 5.1.0 state: description: - Create or destroy the target group. From 192dd489d4d06ba6926ffb26d34294a28c1e58f8 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Wed, 12 Oct 2022 11:25:29 -0700 Subject: [PATCH 14/17] Add integration tests --- .../targets/elb_target/tasks/etg_protocol_version.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml index f87a98ed46f..7d417713189 100644 --- a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml +++ b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml @@ -24,12 +24,13 @@ state: present register: create_result - - debug: msg="{{ 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: @@ -41,12 +42,13 @@ state: present register: create_result - - debug: msg="{{ 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 # ===================================================================== From 54b2128980451f7f7d07a84ec303d832a0e67f58 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Mon, 24 Oct 2022 12:04:31 -0700 Subject: [PATCH 15/17] Add integration tests to test update operations for elb_target_group --- .../elb_target/tasks/etg_protocol_version.yml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml index 7d417713189..131f929d2f7 100644 --- a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml +++ b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml @@ -51,6 +51,43 @@ - create_result.port == 80 # ===================================================================== + - name: Update target group to protocol_version 'HTTP1' + community.aws.elb_target_group: + name: "{{ elb_target_group_name }}" + protocol: http + port: 80 + vpc_id: "{{ vpc.vpc.id }}" + protocol_version: HTTP1 + state: present + register: update_result + + - assert: + that: + - update_result is changed + - update_result is not failed + - update_result.protocol_version == "HTTP1" + - update_result.protocol == "HTTP" + - update_result.port == 80 + + - name: Update target group to protocol_version 'HTTP1' (idempotence) + community.aws.elb_target_group: + name: "{{ elb_target_group_name }}" + protocol: http + port: 80 + vpc_id: "{{ vpc.vpc.id }}" + protocol_version: HTTP1 + state: present + register: update_result + + - assert: + that: + - update_result is not changed + - update_result is not failed + - update_result.protocol_version == "HTTP1" + - update_result.protocol == "HTTP" + - update_result.port == 80 + + # ===================================================================== always: - name: Remove elb target group From 7be06e2605c3b0441712259957e59784a0cad006 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Tue, 25 Oct 2022 12:59:00 -0700 Subject: [PATCH 16/17] Update module documentation --- plugins/modules/elb_target_group.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/modules/elb_target_group.py b/plugins/modules/elb_target_group.py index ed9f2c611e7..855c5ff604f 100644 --- a/plugins/modules/elb_target_group.py +++ b/plugins/modules/elb_target_group.py @@ -92,6 +92,7 @@ protocol_version: description: - Specifies protocol version. + - The protocol_version parameter is immutable and cannot be changed when updating an elb_target_group. required: false choices: ['GRPC', 'HTTP1', 'HTTP2'] type: str From 7cdf2168f5d1a74061f0ee70a0ffdf552dfdbc14 Mon Sep 17 00:00:00 2001 From: sharvarikhedkar Date: Tue, 25 Oct 2022 15:41:12 -0700 Subject: [PATCH 17/17] Remove update operations from integration tests --- .../elb_target/tasks/etg_protocol_version.yml | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml index 131f929d2f7..7d417713189 100644 --- a/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml +++ b/tests/integration/targets/elb_target/tasks/etg_protocol_version.yml @@ -51,43 +51,6 @@ - create_result.port == 80 # ===================================================================== - - name: Update target group to protocol_version 'HTTP1' - community.aws.elb_target_group: - name: "{{ elb_target_group_name }}" - protocol: http - port: 80 - vpc_id: "{{ vpc.vpc.id }}" - protocol_version: HTTP1 - state: present - register: update_result - - - assert: - that: - - update_result is changed - - update_result is not failed - - update_result.protocol_version == "HTTP1" - - update_result.protocol == "HTTP" - - update_result.port == 80 - - - name: Update target group to protocol_version 'HTTP1' (idempotence) - community.aws.elb_target_group: - name: "{{ elb_target_group_name }}" - protocol: http - port: 80 - vpc_id: "{{ vpc.vpc.id }}" - protocol_version: HTTP1 - state: present - register: update_result - - - assert: - that: - - update_result is not changed - - update_result is not failed - - update_result.protocol_version == "HTTP1" - - update_result.protocol == "HTTP" - - update_result.port == 80 - - # ===================================================================== always: - name: Remove elb target group