diff --git a/meta/runtime.yml b/meta/runtime.yml index df3b4370954..7e23cbe5577 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -72,6 +72,13 @@ plugin_routing: The cloudformation_info module returns the same information, but not as ansible_facts. See the module documentation for more information. + ec2: + deprecation: + removal_version: 4.0.0 + warning_text: >- + The ec2 module is based upon a deprecated version of the AWS SDKs + and is deprecated in favor of the ec2_instance module. + Please update your tasks. ec2_ami_facts: deprecation: removal_date: 2021-12-01 diff --git a/plugins/modules/ec2.py b/plugins/modules/ec2.py index ab0b7ea0ab0..902fd1993d7 100644 --- a/plugins/modules/ec2.py +++ b/plugins/modules/ec2.py @@ -11,6 +11,10 @@ module: ec2 version_added: 1.0.0 short_description: create, terminate, start or stop an instance in ec2 +deprecated: + removed_in: 4.0.0 + why: The ec2 module is based upon a deprecated version of the AWS SDK. + alternative: Use M(ec2_instance). description: - Creates or terminates ec2 instances. - > @@ -1959,6 +1963,9 @@ def main(): ], ) + module.deprecate("The 'ec2' module has been deprecated and replaced by the 'ec2_instance' module'", + version='4.0.0', collection_name='amazon.aws') + if module.params.get('group') and module.params.get('group_id'): module.deprecate( msg='Support for passing both group and group_id has been deprecated. '