Skip to content

Commit

Permalink
Formally start the ec2 deprecation process
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Jul 30, 2021
1 parent bdcae7a commit 6f079be
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions plugins/modules/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
- >
Expand Down Expand Up @@ -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. '
Expand Down

0 comments on commit 6f079be

Please sign in to comment.