Release Summary
This release brings some new plugins and features. Several bugfixes, breaking changes and deprecated features are also included. The amazon.aws collection has dropped support for botocore<1.25.0
and boto3<1.22.0
. Support for Python 3.6 has also been dropped.
Minor Changes
- Add github actions to run unit and sanity tests.(#1393).
- AnsibleAWSModule - add support to the
client
andresource
methods for overriding the default parameters (#1303). - CONTRIBUTING.md - refactors and adds to contributor documentation (#924)
- Refactor inventory plugins and add aws_rds inventory unit tests (#1218).
- Refactor module_utils/cloudfront_facts.py and add unit tests (#1265).
- The
black
code formatter has been run across the collection to improve code consistency (#1465). - amazon.aws inventory plugins - additional refactorization of inventory plugin connection handling (#1271).
- amazon.aws lookup plugins -
aws_access_key
has been renamed toaccess_key
for consistency between modules and plugins,aws_access_key
remains as an alias. This change should have no observable effect for users outside the module/plugin documentation (#1225). - amazon.aws lookup plugins -
aws_profile
has been renamed toprofile
for consistency between modules and plugins,aws_profile
remains as an alias. This change should have no observable effect for users outside the module/plugin documentation (#1225). - amazon.aws lookup plugins -
aws_secret_key
has been renamed tosecret_key
for consistency between modules and plugins,aws_secret_key
remains as an alias. This change should have no observable effect for users outside the module/plugin documentation (#1225). - amazon.aws lookup plugins -
aws_security_token
has been renamed tosession_token
for consistency between modules and plugins,aws_security_token
remains as an alias. This change should have no observable effect for users outside the module/plugin documentation (#1225). - amazon.aws modules - bulk update of import statements following various refactors (#1310).
- autoscaling_group - minor linting fixes (#1181).
- aws_account_attribute - the
aws_account_attribute
lookup plugin has been refactored to useAWSLookupBase
as its base class (#1225). - aws_ec2 inventory - minor linting fixes (#1181).
- aws_secret - the
aws_secret
lookup plugin has been refactored to useAWSLookupBase
as its base class (#1225). - aws_secret - the
aws_secret
lookup plugin has been renamedsecretsmanager_secret
,aws_secret
remains as an alias (#1225). - aws_ssm - the
aws_ssm
lookup plugin has been refactored to useAWSLookupBase
as its base class (#1225). - aws_ssm - the
aws_ssm
lookup plugin has been renamedssm_parameter
,aws_ssm
remains as an alias (#1225). - backup - Add logic for backup_selection* modules (#1530).
- bulk migration of
%
and.format()
to fstrings (#1483). - cloud module_utils - minor linting fixes (#1181).
- cloudtrail_info - minor linting fixes (#1181).
- cloudwatchlogs_log_group - minor linting fixes (#1181).
- docs_fragments -
amazon.aws.boto3
fragment now pulls the botocore version requirements frommodule_utils.botocore
(#1248). - docs_fragments - common parameters for modules and plugins have been synchronised and moved to
amazon.aws.common.modules
andamazon.aws.common.plugins
(#1248). - docs_fragments - region parameters for modules and plugins have been synchronised and moved to
amazon.aws.region.modules
andamazon.aws.region.plugins
(#1248). - ec2_ami - Extend the unit-test coverage of the module (#1159).
- ec2_ami - allow
ImageAvailable
waiter to retry when the image can't be found (#1321). - ec2_ami_info - Add unit-tests coverage (#1252).
- ec2_eip - minor linting fixes (#1181).
- ec2_eni_info - Add unit-tests coverage (#1236).
- ec2_instance - avoid changing
module.params
(#1187). - ec2_instance - updated to avoid manipulating
module.params
(#1337). - ec2_security_group - added rule options to argument specifications to improve handling of inputs (#1214).
- ec2_security_group - refacter
get_target_from_rule()
(#1221). - ec2_security_group - refactor rule expansion and add unit tests (#1261).
- ec2_snapshot - Reenable the integration tests (#1235).
- ec2_snapshot_info - Add unit-tests coverage (#1211).
- ec2_vpc_route_table - add support for Carrier Gateway entry (#926).
- ec2_vpc_subnet - retry fetching subnet details after creation if the first attempt fails (#1526).
- inventory aws ec2 - add parameter
use_ssm_inventory
allowing to query ssm inventory information for configured EC2 instances and populate hostvars (#704). - inventory plugins - refactor cache handling (#1285).
- inventory plugins - refactor file verification handling (#1285).
- inventory_aws_ec2 integration tests - replace local module
test_get_ssm_inventory
bycommunity.aws.ssm_inventory_info
(#1416). - kms_key_info - minor linting fixes (#1181).
- lambda - minor linting fixes (#1181).
- lambda - use common
get_aws_account_info
helper rather than reimplementing (#1181). - lambda_alias - refactored to avoid passing around the complex
module
resource (#1336). - lambda_alias - updated to avoid manipulating
module.params
(#1336). - lambda_execute - minor linting fixes (#1181).
- lambda_info - updated to avoid manipulating
module.params
(#1336). - lambda_layer_info - add support for parameter version_number to retrieve detailed information for a specific layer version (#1293).
- module_utils - move RetryingBotoClientWrapper into module_utils.retries for reuse with other plugin types (#1230).
- module_utils - move exceptions into dedicated python module (#1246).
- module_utils - refacter botocore version validation into module_utils.botocore for future reuse (#1227).
- module_utils.acm - Refactor ACMServiceManager class and add unit tests (#1273).
- module_utils.botocore - Add Ansible AWS User-Agent identification (#1306).
- module_utils.botocore - refactorization of
get_aws_region
,get_aws_connection_info
so that the code can be reused by non-module plugins (#1231). - module_utils.policy - minor refacter of code to reduce complexity and improve test coverage (#1136).
- module_utils.s3 - Refactor get_s3_connection into a module_utils for S3 modules and expand module_utils.s3 unit tests (#1139).
- module_utils/botocore - added support to
_boto3_conn
for passing dictionaries of configuration (#1307). - plugin_utils - Added
AWSConnectionBase
to support refactoring connection plugins (#1340). - rds - AWS is phasing out aurora1. Integration tests use aurora2 (aurora-mysql) by default (#1233).
- rds_cluster - Split up the functional tests in smaller targets (#1175).
- rds_cluster_snapshot - minor linting fixes (#1181).
- rds_instance - minor linting fixes (#1181).
- rds_instance_info - Add unit-tests coverage (#1132).
- rds_instance_snapshot - minor linting fixes (#1181).
- rds_param_group - drop Python2 import fallbacks (#1513).
- route53_health_check - Drop deprecation warning (ansible-collections/community.aws#1335).
- route53_health_check - minor fix for returning health check info while updating a Route53 health check (#1200).
- route53_health_check - minor linting fixes (#1181).
- route53_info - drop unused imports (#1462).
- s3_bucket - add support for S3 dualstack endpoint (#1305).
- s3_bucket - handle missing read permissions more gracefully when possible (#1406).
- s3_bucket - refactor S3 connection code (#1305).
- s3_object - refactor S3 connection code (#1305).
- s3_object - refactor main to reduce complexity (#1193).
- s3_object_info - minor linting fixes (#1181).
- s3_object_info - refactor S3 connection code (#1305).
Breaking Changes / Porting Guide
- The amazon.aws collection has dropped support for
botocore<1.25.0
andboto3<1.22.0
. Most modules will continue to work with older versions of the AWS SDK, however compatibility with older versions of the SDK is not guaranteed and will not be tested. When using older versions of the SDK a warning will be emitted by Ansible (#1342). - amazon.aws - compatibility code for Python < 3.6 has been removed (#1257).
- ec2_eip - the previously deprecated
instance_id
alias for thedevice_id
parameter has been removed. Please use thedevice_id
parameter name instead (#1176). - ec2_instance - the default value for
instance_type
has been removed. At least one ofinstance_type
orlaunch_template
must be specified when launching new instances (#1315). - ec2_vpc_dhcp_options - the
new_options
return value has been deprecated after being renamed todhcp_config
. Please use thedhcp_config
ordhcp_options
return values (#1327). - ec2_vpc_endpoint - the
policy_file
parameter has been removed. I(policy) with a file lookup can be used instead (#1178). - ec2_vpc_net - the
classic_link_enabled
return value has been removed. Support for EC2 Classic networking was dropped by AWS (#1374). - ec2_vpc_net_info - the
classic_link_dns_status
return value has been removed. Support for EC2 Classic networking was dropped by AWS (#1374). - ec2_vpc_net_info - the
classic_link_enabled
return value has been removed. Support for EC2 Classic networking was dropped by AWS (#1374). - module_utils.cloud - the previously deprecated
CloudRetry.backoff
has been removed. Please useCloudRetry.exponential_backoff
orCloudRetry.jittered_backoff
instead (#1110).
Deprecated Features
- amazon.aws collection - due to the AWS SDKs Python support policies (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/) support for Python less than 3.8 by this collection is expected to be removed in a release after 2024-12-01 (#1342).
- amazon.aws collection - due to the AWS SDKs announcing the end of support for Python less than 3.7 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/) support for Python less than 3.7 by this collection has been deprecated and will be removed in release 7.0.0. (#1342).
- amazon.aws lookup plugins - the
boto3_profile
alias for theprofile
option has been deprecated, please useprofile
instead (#1225). - docs_fragments -
amazon.aws.aws_credentials
docs fragment has been deprecated please useamazon.aws.common.plugins
instead (#1248). - docs_fragments -
amazon.aws.aws_region
docs fragment has been deprecated please useamazon.aws.region.plugins
instead (#1248). - docs_fragments -
amazon.aws.aws
docs fragment has been deprecated please useamazon.aws.common.modules
instead (#1248). - docs_fragments -
amazon.aws.ec2
docs fragment has been deprecated please useamazon.aws.region.modules
instead (#1248). - module_utils.policy -
ansible_collections.amazon.aws.module_utils.policy.sort_json_policy_dict
has been deprecated consider usingansible_collections.amazon.aws.module_utils.poilcies.compare_policies
instead (#1136). - s3_object - Support for passing
dualstack
andendpoint_url
at the same time has been deprecated, thedualstack
parameter is ignored whenendpoint_url
is passed. Support will be removed in a release after 2024-12-01 (#1305). - s3_object - Support for passing values of
overwrite
other thanalways
,never
,different
or lastlast
has been deprecated. Boolean values should be replaced by the stringsalways
ornever
Support will be removed in a release after 2024-12-01 (#1305). - s3_object_info - Support for passing
dualstack
andendpoint_url
at the same time has been deprecated, thedualstack
parameter is ignored whenendpoint_url
is passed. Support will be removed in a release after 2024-12-01 (#1305).
Removed Features (previously deprecated)
- ec2_vpc_endpoint_info - support for the
query
parameter was removed. Theamazon.aws.ec2_vpc_endpoint_info
module now only queries for endpoints. Services can be queried using theamazon.aws.ec2_vpc_endpoint_service_info
module (#1308). - s3_object - support for creating and deleting buckets using the
s3_object
module has been removed. S3 buckets can be created and deleted using theamazon.aws.s3_bucket
module (#1112).
Bugfixes
- ec2_security_group - file included unreachable code. Fix now removes unreachable code by removing an inapproproate logic (#1348).
- ec2_vpc_dhcp_option - retry
describe_dhcp_options
after creation whenInvalidDhcpOptionID.NotFound
is raised (#1320). - lambda_execute - Fix waiter error when function_arn is passed instead of name(#1268).
- module_utils - fixes
TypeError: deciding_wrapper() got multiple values for argument 'aws_retry'
when passing positional arguments to functions wrapped by AnsibleAWSModule.client (#1230). - rds_param_group - added a check to fail the task while modifying/updating rds_param_group if trying to change DB parameter group family. (#1169).
- route53_health_check - Fix
Name
tag key removal idempotentcy issue when creating health_check withuse_unique_names
andtags
set (#1253). - s3_bucket - Handle setting of permissions while acl is disabled.(#1168).
New Plugins
Lookup
- aws_collection_constants - expose various collection related constants
New Modules
- backup_plan - Manage AWS Backup Plans
- backup_plan_info - Describe AWS Backup Plans
- backup_restore_job_info - List information about backup restore jobs
- backup_selection - Create, delete and modify AWS Backup selection
- backup_selection_info - Describe AWS Backup Selections
- backup_tag - Manage tags on backup plan, backup vault, recovery point
- backup_tag_info - List tags on AWS Backup resources
- backup_vault - Manage AWS Backup Vaults
- backup_vault_info - Describe AWS Backup Vaults