-
Bug
-
Resolution: Done
-
Undefined
-
None
-
Unspecified
-
False
-
-
False
-
-
https://github.com/ansible-collections/amazon.aws/issues/2110
-
-
- Summary
-
The module `amazon.aws.backup_plan` does not provide example of usage `advanced_backup_settings` and `advanced_backup_settings.backup_options` param.
Also looking at the argspec for the option, not sure if it will work as expected because it's expecting a dict but I what actually gets passed is a string.
https://github.com/ansible-collections/amazon.aws/blob/main/plugins/modules/backup_plan.py#L151-L156
https://github.com/ansible-collections/amazon.aws/blob/main/plugins/modules/backup_plan.py#L383-L393
-
-
- Issue Type
-
Bug Report
-
-
- Component Name
-
backup_plan
-
-
- Ansible Version
-
```console (paste below)
$ ansible --version
ansible [core 2.15.5]
```
-
-
- Collection Versions
-
```console (paste below)
$ ansible-galaxy collection list
amazon.aws 9.0.0-dev0a
```
-
-
- AWS SDK versions
-
```console (paste below)
$ pip show boto boto3 botocore
Name: boto3
Version: 1.28.15
—
Name: botocore
Version: 1.31.54
```
-
-
- Configuration
-
```console (paste below)
$ ansible-config dump --only-changed
```
-
-
- OS / Environment
-
No response
-
-
- Steps to Reproduce
-
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
—
- name: Example for amazon.aws.backup_plan
hosts: localhost
gather_facts: false
tasks: - name: Create a backup plan
amazon.aws.backup_plan:
state: present
backup_plan_name: my-test-backup-plan1
advanced_backup_settings: - resource_type: EC2
backup_options: {"WindowsVSS": "enabled"}tags:
TagKey1: TagValue1
TagKey2: TagValue2
rules: - rule_name: present
target_backup_vault_name: my-test-vault
schedule_expression: 'cron(0 5 ? * * *)'
lifecycle:
move_to_cold_storage_after_days: 1
delete_after_days: 91
recovery_point_tags:
Key1: Value1
Key2: Value2
copy_actions: - destination_backup_vault_arn: arn:aws:backup:us-west-2:123456789:backup-vault:my-test-vault
lifecycle:
move_to_cold_storage_after_days: 1
delete_after_days: 91
register: create_result
```
Create a backup_plan using the option similar to above
-
-
- Expected Results
-
The usage of param is advanced_backup_settings verified and fixed if required.
-
-
- Actual Results
-
```console (paste below)
```
-
-
- Code of Conduct
-
- [X] I agree to follow the Ansible Code of Conduct