Skip to content

Commit

Permalink
Bump botocore requirements (ansible-collections#1968)
Browse files Browse the repository at this point in the history
[7.0.0] Bump botocore requirements

SUMMARY
In line with ansible-collections#1763 bump our botocore requirements for 7.0.0
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
README.md
changelogs/fragments/botocore.yml
changelogs/fragments/python37.yml
plugins/modules/dynamodb_table.py
plugins/modules/ec2_launch_template.py
plugins/modules/networkfirewall_policy.py
plugins/modules/networkfirewall_rule_group.py
plugins/modules/networkfirewall_rule_group_info.py
plugins/modules/opensearch.py
plugins/modules/opensearch_info.py
plugins/modules/s3_lifecycle.py
plugins/modules/wafv2_web_acl.py
requirements.txt
tests/config.yml
tests/integration/constraints.txt
tests/unit/constraints.txt
ADDITIONAL INFORMATION
Deliberately links to the amazon.aws PR to avoid duplicating the reasons.

Reviewed-by: Alina Buzachis

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@b753fe5
  • Loading branch information
tremble authored and abikouo committed Oct 18, 2024
1 parent 77165b3 commit 464d0b4
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions plugins/modules/ec2_launch_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,15 +368,13 @@
type: str
description: >
- Wether the instance metadata endpoint is available via IPv6 (C(enabled)) or not (C(disabled)).
- Requires botocore >= 1.21.29
choices: [enabled, disabled]
default: 'disabled'
instance_metadata_tags:
version_added: 3.1.0
type: str
description:
- Wether the instance tags are availble (C(enabled)) via metadata endpoint or not (C(disabled)).
- Requires botocore >= 1.23.30
choices: [enabled, disabled]
default: 'disabled'
extends_documentation_fragment:
Expand Down Expand Up @@ -582,23 +580,6 @@ def create_or_update(module, template_options):
lt_data = params_to_launch_data(module, dict((k, v) for k, v in module.params.items() if k in template_options))
lt_data = scrub_none_parameters(lt_data, descend_into_lists=True)

if lt_data.get("MetadataOptions"):
if not module.botocore_at_least("1.23.30"):
# fail only if enabled is requested
if lt_data["MetadataOptions"].get("InstanceMetadataTags") == "enabled":
module.require_botocore_at_least("1.23.30", reason="to set instance_metadata_tags")
# pop if it's not requested to keep backwards compatibility.
# otherwise the modules failes because parameters are set due default values
lt_data["MetadataOptions"].pop("InstanceMetadataTags")

if not module.botocore_at_least("1.21.29"):
# fail only if enabled is requested
if lt_data["MetadataOptions"].get("HttpProtocolIpv6") == "enabled":
module.require_botocore_at_least("1.21.29", reason="to set http_protocol_ipv6")
# pop if it's not requested to keep backwards compatibility.
# otherwise the modules failes because parameters are set due default values
lt_data["MetadataOptions"].pop("HttpProtocolIpv6")

if not (template or template_versions):
# create a full new one
try:
Expand Down

0 comments on commit 464d0b4

Please sign in to comment.