community.aws
community.aws copied to clipboard
EFS: Add backup option
Summary
Add the Backup
option for EFS
Issue Type
Feature Idea
Component Name
efs
Additional Information
From what i can see here, i assume it should be quite easy to add this i hope.
Default should be false
Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct
Files identified in the description:
- [
plugins/modules/efs.py
](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/modules/efs.py)
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @akazakov @jillr @markuman @ryansydnor @s-hertel @tremble click here for bot help
@markuman Can I take on this issue?
@markuman Can I take on this issue?
Yes, of course!
@markuman @nick-zh ,
Just to confirm that I am doing addressing this issue the right way, the idea is to add a Backup parameter (which is a boolean) create_file_system
function (L416) and in the main
function
https://github.com/ansible-collections/community.aws/blob/cb9716e14d44357aaadd2be733bbaa0dd8a522bc/plugins/modules/efs.py#L416
@akamanzi yes, exactly. basically you must complete four things.
-
create_file_system
. easy -
update_file_system
- it must be possible to enable/disable the backup feature on existing EFS
- but take care about backwards compatibility on existing playbooks. therefore, the
backup
parameter must not have a default value.
- expand the integration test
- add a changelog fragment to your PR
@markuman , Thank you for the guidance.
Upon further reading, it looks the update_file_system
only updates the throughput (ThroughPutMode) and the amount of provisioned throughput (ProvisionedThroughputInMbs). It seems like the backup is only enabled on creation of the EFS. Check here for reference
@akamanzi ah, I didn't know that. Then it's just step 1, 3 and 4,
i still think we need at least the logic of point 2, as it should be possible to enable / disable backup for an EFS if a backup strategy is explicitly set, from what i can see, this can be achieved with put_backup_policy
@nick-zh, I agree we still need logic for point 2 and thanks for pointing this out. The put_backup_policy
and describe_backup_policy
should do the job.
Currently, I have added the backup option while creating the EFS but I had trouble running the integration tests as the documentation is not crystal clear on how run them. However, after searching around I figured it out and should soon add point 2 as well.