Open joaoamaro-vakt opened 12 months ago
Adding that a fix was raised before here #63335 but it seems it was not merged
@joaoamaro-vakt Thank you for filing an issue. You are using an unsupported version of Ansible. Could you please verify that the bug still happens with Ansible 2.14 or higher? Would you be willing to file a PR to fix this?
Also ran into this issue when restoring from a snapshot on ansible-core 2.15.12.
In researching, this appears to be a limitation of boto3 and the RDS API, as none of the restore_db*
functions accept arguments related to enhanced monitoring or performance insights. So two separate boto3 calls would be needed: one to restore the instance, and one to modify_db_instance
to enable performance insights.
A workaround is to use two consecutive amazon.aws.rds_instance
tasks:
- name: "Creating {{ database_name }}"
amazon.aws.rds_instance:
id: "{{ database_instance }}"
<...other parameters...>
wait: yes
register: new_rds_instance
- name: "Enabling performance insights on {{ database_name }}"
amazon.aws.rds_instance:
id: "{{ new_rds_instance.db_instance_identifier }}"
enable_performance_insights: true
performance_insights_retention_period: "{{ (rds_performance_insights | bool) | ternary(7, 0) }}"
performance_insights_kms_key_id: "{{ (rds_performance_insights | bool) | ternary(kms_arn, '') }}"
apply_immediately: true
Summary
When restoring a database from a snapshot with the enable_performance_insights set to true, the database does not have it enabled.
Issue Type
Bug Report
Component Name
rds_instance
Ansible Version
Collection Versions
AWS SDK versions
Configuration
N/A
OS / Environment
Restoring a postgresql RDS snapshot Postgresql version 14.8
Steps to Reproduce
Restore a RDS Snapshot
Expected Results
Performance Insights Enabled
Actual Results
Code of Conduct