-
Notifications
You must be signed in to change notification settings - Fork 357
Add Performance Insights and Database Insights to rds_cluster.py #2543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
randoneering
wants to merge
9
commits into
ansible-collections:main
Choose a base branch
from
randoneering:add_PI_rds_cluster
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e3c4f36
adding performance insights,database insights to rds_cluster
randoneering 1bb572c
added descriptions for features
randoneering a3fdb70
update to documentation
randoneering 92322d2
adding changelog fragment and version_add
randoneering 606b7d4
Update plugins/modules/rds_cluster.py
randoneering f7c019e
documentation adjustments
randoneering 598b012
debugging-it was performanceinsightsenabled
randoneering dbec6b4
moving changes from local testing, adding int tests, still in progress
randoneering d4871b5
edits to comments by s-hertel
randoneering File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
minor_changes: | ||
- Add functionality to enable Performance Insights and Database Insights at cluster level (https://github.com/ansible-collections/amazon.aws/pull/2543). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
tests/integration/targets/rds_cluster_performance_insights/aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
time=20m | ||
cloud/aws | ||
rds_cluster | ||
rds_cluster_info |
10 changes: 10 additions & 0 deletions
10
tests/integration/targets/rds_cluster_performance_insights/defaults/main.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
# Create cluster | ||
cluster_id: ansible-test-cluster-{{ tiny_prefix }} | ||
username: testrdsusername | ||
password: test-rds_password | ||
engine: aurora-mysql | ||
db_port: 3306 | ||
tags_create: | ||
Name: ansible-test-cluster-{{ tiny_prefix }} | ||
Created_By: Ansible_rds_cluster_integration_test |
104 changes: 104 additions & 0 deletions
104
tests/integration/targets/rds_cluster_performance_insights/tasks/create_cluster_with_pi.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
--- | ||
- module_defaults: | ||
group/aws: | ||
region: "{{ aws_region }}" | ||
access_key: "{{ aws_access_key }}" | ||
secret_key: "{{ aws_secret_key }}" | ||
session_token: "{{ security_token | default(omit) }}" | ||
block: | ||
- name: Ensure the resource doesn't exist | ||
amazon.aws.rds_cluster: | ||
id: "{{ cluster_id }}" | ||
state: absent | ||
engine: "{{ engine }}" | ||
username: "{{ username }}" | ||
password: "{{ password }}" | ||
skip_final_snapshot: true | ||
register: _result_delete_db_cluster | ||
|
||
- ansible.builtin.assert: | ||
that: | ||
- not _result_delete_db_cluster.changed | ||
ignore_errors: true | ||
|
||
- name: Get info of all existing clusters | ||
amazon.aws.rds_cluster_info: | ||
register: _result_cluster_info | ||
|
||
- ansible.builtin.assert: | ||
that: | ||
- _result_cluster_info is successful | ||
|
||
- name: Create Cluster with Performance Insights Enabled and Database Insights Enabled (CHECK MODE) | ||
amazon.aws.rds_cluster: | ||
engine: "{{ engine }}" | ||
username: "{{ username }}" | ||
password: "{{ password }}" | ||
cluster_id: "{{ cluster_id }}" | ||
enable_performance_insights: true | ||
performance_insights_retention_period: 7 | ||
database_insights_mode: standard | ||
tags: "{{ tags_create }}" | ||
register: _result_create_db_cluster | ||
check_mode: true | ||
|
||
- ansible.builtin.assert: | ||
that: | ||
- _result_create_db_cluster.changed | ||
|
||
- name: Create Cluster with Performance Insights Enabled and Database Insights Enabled (CHECK MODE) | ||
amazon.aws.rds_cluster: | ||
engine: "{{ engine }}" | ||
username: "{{ username }}" | ||
password: "{{ password }}" | ||
cluster_id: "{{ cluster_id }}" | ||
enable_performance_insights: true | ||
performance_insights_retention_period: 7 | ||
database_insights_mode: standard | ||
tags: "{{ tags_create }}" | ||
register: _result_create_db_cluster | ||
|
||
- ansible.builtin.assert: | ||
that: | ||
- _result_create_db_cluster.changed | ||
- "'allocated_storage' in _result_create_db_cluster" | ||
- _result_create_db_cluster.allocated_storage == 1 | ||
- "'cluster_create_time' in _result_create_db_cluster" | ||
- _result_create_db_cluster.copy_tags_to_snapshot == false | ||
- "'db_cluster_arn' in _result_create_db_cluster" | ||
- "'db_cluster_identifier' in _result_create_db_cluster" | ||
- _result_create_db_cluster.db_cluster_identifier == cluster_id | ||
- "'db_cluster_parameter_group' in _result_create_db_cluster" | ||
- "'db_cluster_resource_id' in _result_create_db_cluster" | ||
- "'endpoint' in _result_create_db_cluster" | ||
- "'engine' in _result_create_db_cluster" | ||
- _result_create_db_cluster.engine == engine | ||
- "'engine_mode' in _result_create_db_cluster" | ||
- _result_create_db_cluster.engine_mode == "provisioned" | ||
- "'engine_version' in _result_create_db_cluster" | ||
- "'master_username' in _result_create_db_cluster" | ||
- _result_create_db_cluster.master_username == username | ||
- "'port' in _result_create_db_cluster" | ||
- _result_create_db_cluster.port == db_port | ||
- "'status' in _result_create_db_cluster" | ||
- _result_create_db_cluster.status == 'available' | ||
- _result_create_db_cluster.storage_encrypted == false | ||
- "'tags' in _result_create_db_cluster" | ||
- _result_create_db_cluster.tags | length == 2 | ||
- _result_create_db_cluster.tags["Created_By"] == tags_create["Created_By"] | ||
- _result_create_db_cluster.tags["Name"] == tags_create["Name"] | ||
- "'vpc_security_groups' in _result_create_db_cluster" | ||
- _"'enable_performance_insights' in _result_create_db_cluster" | ||
- _result_create_db_cluster.enable_performance_insights == true | ||
- _"'performance_insights_retention_period' in _result_create_db_cluster" | ||
- _result_create_db_cluster.performance_insights_retention_period == 7 | ||
- _"'database_insights_mode' in _result_create_db_cluster" | ||
- _result_create_db_cluster.database_insights_mode == standard | ||
- name: Get info of the existing cluster | ||
amazon.aws.rds_cluster_info: | ||
cluster_id: "{{ cluster_id }}" | ||
register: result_cluster_info | ||
|
||
- ansible.builtin.assert: | ||
that: | ||
- result_cluster_info is successful |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.