Skip to content

Commit

Permalink
Add additional storage classes to S3 lifecycle transition list. (ansi…
Browse files Browse the repository at this point in the history
…ble-collections#270)

* Add additional storage classes to S3 lifecycle transition list.
* Add minor changes changelog for S3 lifecycle transition list change.
  • Loading branch information
philltomlinson authored Oct 20, 2020
1 parent 451cba2 commit ae6c508
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- s3_lifecycle - Add support for intelligent tiering and deep archive storage classes (https://github.com/ansible-collections/community.aws/issues/270)
11 changes: 6 additions & 5 deletions plugins/modules/s3_lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
description:
- 'Transition noncurrent versions to this storage class'
default: glacier
choices: ['glacier', 'onezone_ia', 'standard_ia']
choices: ['glacier', 'onezone_ia', 'standard_ia', 'intelligent_tiering', 'deep_archive']
required: false
type: str
noncurrent_version_transition_days:
Expand Down Expand Up @@ -91,10 +91,10 @@
type: str
storage_class:
description:
- "The storage class to transition to. Currently there are two supported values - 'glacier', 'onezone_ia', or 'standard_ia'."
- "The storage class to transition to."
- "The 'standard_ia' class is only being available from Ansible version 2.2."
default: glacier
choices: [ 'glacier', 'onezone_ia', 'standard_ia']
choices: [ 'glacier', 'onezone_ia', 'standard_ia', 'intelligent_tiering', 'deep_archive']
type: str
transition_date:
description:
Expand Down Expand Up @@ -437,20 +437,21 @@ def destroy_lifecycle_rule(client, module):


def main():
s3_storage_class = ['glacier', 'onezone_ia', 'standard_ia', 'intelligent_tiering', 'deep_archive']
argument_spec = dict(
name=dict(required=True, type='str'),
expiration_days=dict(type='int'),
expiration_date=dict(),
noncurrent_version_expiration_days=dict(type='int'),
noncurrent_version_storage_class=dict(default='glacier', type='str', choices=['glacier', 'onezone_ia', 'standard_ia']),
noncurrent_version_storage_class=dict(default='glacier', type='str', choices=s3_storage_class),
noncurrent_version_transition_days=dict(type='int'),
noncurrent_version_transitions=dict(type='list', elements='dict'),
prefix=dict(),
requester_pays=dict(type='bool', removed_at_date='2022-06-01', removed_from_collection='community.aws'),
rule_id=dict(),
state=dict(default='present', choices=['present', 'absent']),
status=dict(default='enabled', choices=['enabled', 'disabled']),
storage_class=dict(default='glacier', type='str', choices=['glacier', 'onezone_ia', 'standard_ia']),
storage_class=dict(default='glacier', type='str', choices=s3_storage_class),
transition_days=dict(type='int'),
transition_date=dict(),
transitions=dict(type='list', elements='dict'),
Expand Down

0 comments on commit ae6c508

Please sign in to comment.