From 25034934df002c81bdf33da782196b0c0f693688 Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Thu, 27 Oct 2022 18:27:48 +0200 Subject: [PATCH] rds - add the engine_mode parameter (#941) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rds - add the engine_mode parameter Depends-On: #1185 Add a new engine_mode parameter to rds_cluster and also adjust the test-suite follow-up to some recent API changes: With the aurora engine, engine_mode default now on serverless. We cannot adjust the endpoint_port of a serverless cluster. aurora clusters are now encrypted by default (storage_encrypted) The new engine_mode parameter also allows us to re-enable the Aurora test of the rds_instance integration tests. Reviewed-by: Gonéri Le Bouder Reviewed-by: Alina Buzachis --- .../fragments/rds_cluster_engine_mode.yaml | 3 ++ plugins/modules/rds_cluster.py | 34 +++++++++++++++++-- .../roles/rds_cluster/defaults/main.yml | 2 +- .../roles/rds_cluster/tasks/test_create.yml | 4 +-- .../rds_cluster/tasks/test_create_sgs.yml | 8 ++--- .../roles/rds_cluster/tasks/test_modify.yml | 20 ++++++----- .../roles/rds_cluster/tasks/test_promote.yml | 4 +-- .../roles/rds_cluster/tasks/test_restore.yml | 8 ++--- .../roles/rds_cluster/tasks/test_tag.yml | 24 ++++++------- .../rds_cluster_snapshot/tasks/main.yml | 4 +-- .../targets/rds_instance_aurora/aliases | 2 -- .../rds_instance_aurora/tasks/main.yml | 16 ++++----- 12 files changed, 82 insertions(+), 47 deletions(-) create mode 100644 changelogs/fragments/rds_cluster_engine_mode.yaml diff --git a/changelogs/fragments/rds_cluster_engine_mode.yaml b/changelogs/fragments/rds_cluster_engine_mode.yaml new file mode 100644 index 00000000000..6527756ee8a --- /dev/null +++ b/changelogs/fragments/rds_cluster_engine_mode.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: +- "rds_cluster - New the engine_mode parameter (https://github.com/ansible-collections/amazon.aws/pull/941)." diff --git a/plugins/modules/rds_cluster.py b/plugins/modules/rds_cluster.py index c2025423495..d73b890840e 100644 --- a/plugins/modules/rds_cluster.py +++ b/plugins/modules/rds_cluster.py @@ -219,6 +219,19 @@ - mysql - postgres type: str + engine_mode: + description: + - The DB engine mode of the DB cluster. The combinaison of I(engine) and I(engine_mode) may not be supported. + - "See AWS documentation for details: + L(Amazon RDS Documentation,https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html)." + choices: + - provisioned + - serverless + - parallelquery + - global + - multimaster + type: str + version_added: 5.1.0 engine_version: description: - The version number of the database engine to use. @@ -432,6 +445,23 @@ username: "{{ username }}" cluster_id: "cluster-{{ resource_prefix }}-restored" snapshot_identifier: "cluster-{{ resource_prefix }}-snapshot" + +- name: Create an Aurora PostgreSQL cluster and attach an intance + amazon.aws.rds_cluster: + state: present + engine: aurora-postgresql + engine_mode: provisioned + cluster_id: '{{ cluster_id }}' + username: '{{ username }}' + password: '{{ password }}' + +- name: Attach a new instance to the cluster + amazon.aws.rds_instance: + id: '{{ instance_id }}' + cluster_id: '{{ cluster_id }}' + engine: aurora-postgresql + state: present + db_instance_class: 'db.t3.medium' ''' RETURN = r''' @@ -989,9 +1019,9 @@ def main(): copy_tags_to_snapshot=dict(type='bool'), domain=dict(), domain_iam_role_name=dict(), - enable_global_write_forwarding=dict(type="bool"), + enable_global_write_forwarding=dict(type='bool'), db_cluster_instance_class=dict(type="str"), - enable_iam_database_authentication=dict(type="bool"), + enable_iam_database_authentication=dict(type='bool'), engine=dict(choices=["aurora", "aurora-mysql", "aurora-postgresql", "mysql", "postgres"]), engine_mode=dict(choices=["provisioned", "serverless", "parallelquery", "global", "multimaster"]), engine_version=dict(), diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/defaults/main.yml b/tests/integration/targets/rds_cluster/roles/rds_cluster/defaults/main.yml index 8130abc59f7..f1217a95e46 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/defaults/main.yml +++ b/tests/integration/targets/rds_cluster/roles/rds_cluster/defaults/main.yml @@ -4,7 +4,7 @@ cluster_id: ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix}} username: testrdsusername password: test-rds_password -engine: aurora-mysql +engine: aurora port: 3306 tags_create: Name: ansible-test-cluster-{{ tiny_prefix }} diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create.yml b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create.yml index 8d49d9f5fa1..54b3143ffd4 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create.yml +++ b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create.yml @@ -62,7 +62,7 @@ - "'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" + - _result_create_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_create_db_cluster" - "'master_username' in _result_create_db_cluster" - _result_create_db_cluster.master_username == "{{ username }}" @@ -70,7 +70,7 @@ - _result_create_db_cluster.port == {{ port }} - "'status' in _result_create_db_cluster" - _result_create_db_cluster.status == 'available' - - _result_create_db_cluster.storage_encrypted == false + - _result_create_db_cluster.storage_encrypted == true - "'tags' in _result_create_db_cluster" - _result_create_db_cluster.tags | length == 2 - _result_create_db_cluster.tags["Created_By"] == "{{ tags_create["Created_By"]}}" diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create_sgs.yml b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create_sgs.yml index 7f3ac5d3ea4..99362ee07af 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create_sgs.yml +++ b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create_sgs.yml @@ -71,7 +71,7 @@ - "'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" + - _result_create_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_create_db_cluster" - "'master_username' in _result_create_db_cluster" - _result_create_db_cluster.master_username == "{{ username }}" @@ -79,7 +79,7 @@ - _result_create_db_cluster.port == {{ port }} - "'status' in _result_create_db_cluster" - _result_create_db_cluster.status == 'available' - - _result_create_db_cluster.storage_encrypted == false + - _result_create_db_cluster.storage_encrypted == true - "'tags' in _result_create_db_cluster" - "'vpc_security_groups' in _result_create_db_cluster" - _result_create_db_cluster.vpc_security_groups | selectattr('status', 'in', @@ -126,7 +126,7 @@ - "'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" + - _result_create_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_create_db_cluster" - "'master_username' in _result_create_db_cluster" - _result_create_db_cluster.master_username == "{{ username }}" @@ -134,7 +134,7 @@ - _result_create_db_cluster.port == {{ port }} - "'status' in _result_create_db_cluster" - _result_create_db_cluster.status == 'available' - - _result_create_db_cluster.storage_encrypted == false + - _result_create_db_cluster.storage_encrypted == true - "'tags' in _result_create_db_cluster" - "'vpc_security_groups' in _result_create_db_cluster" - _result_create_db_cluster.vpc_security_groups | selectattr('status', 'in', diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_modify.yml b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_modify.yml index c9e007c13d1..f72357ddcf7 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_modify.yml +++ b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_modify.yml @@ -3,7 +3,7 @@ rds_cluster: id: '{{ cluster_id }}' state: absent - engine: '{{ engine}}' + engine: '{{ engine }}' username: '{{ username }}' password: '{{ password }}' skip_final_snapshot: true @@ -14,11 +14,15 @@ - not _result_delete_db_cluster.changed ignore_errors: yes - - name: Create a DB cluster + # Follow up to Aurora Serverless V2 release, we use an aurora-mysql to + # avoid the following error when we try to adjust the port: + # You currently can't modify EndpointPort with Aurora Serverless. + - name: Create an Aurora-MySQL DB cluster rds_cluster: id: '{{ cluster_id }}' state: present - engine: '{{ engine }}' + engine: aurora-mysql + engine_mode: provisioned username: '{{ username }}' password: '{{ password }}' register: _result_create_source_db_cluster @@ -37,7 +41,7 @@ - "'db_cluster_resource_id' in _result_create_source_db_cluster" - "'endpoint' in _result_create_source_db_cluster" - "'engine' in _result_create_source_db_cluster" - - _result_create_source_db_cluster.engine == "{{ engine }}" + - _result_create_source_db_cluster.engine == "aurora-mysql" - "'engine_mode' in _result_create_source_db_cluster" - _result_create_source_db_cluster.engine_mode == "provisioned" - "'engine_version' in _result_create_source_db_cluster" @@ -72,7 +76,7 @@ - "'db_cluster_resource_id' in _result_modify_password" - "'endpoint' in _result_modify_password" - "'engine' in _result_modify_password" - - _result_modify_password.engine == "{{ engine }}" + - _result_modify_password.engine == "aurora-mysql" - "'engine_mode' in _result_modify_password" - _result_modify_password.engine_mode == "provisioned" - "'engine_version' in _result_modify_password" @@ -105,7 +109,7 @@ - "'db_cluster_resource_id' in _result_modify_port" - "'endpoint' in _result_modify_port" - "'engine' in _result_modify_port" - - _result_modify_port.engine == "{{ engine }}" + - _result_modify_port.engine == "aurora-mysql" - "'engine_mode' in _result_modify_port" - _result_modify_port.engine_mode == "provisioned" - "'engine_version' in _result_modify_port" @@ -140,7 +144,7 @@ - "'db_cluster_resource_id' in _result_modify_id" - "'endpoint' in _result_modify_id" - "'engine' in _result_modify_id" - - _result_modify_id.engine == "{{ engine }}" + - _result_modify_id.engine == "aurora-mysql" - "'engine_mode' in _result_modify_id" - _result_modify_id.engine_mode == "provisioned" - "'engine_version' in _result_modify_id" @@ -199,7 +203,7 @@ - "'db_cluster_resource_id' in _result_modify_db_parameter_group_name" - "'endpoint' in _result_modify_db_parameter_group_name" - "'engine' in _result_modify_db_parameter_group_name" - - _result_modify_db_parameter_group_name.engine == "{{ engine }}" + - _result_modify_db_parameter_group_name.engine == "aurora-mysql" - "'engine_mode' in _result_modify_db_parameter_group_name" - _result_modify_db_parameter_group_name.engine_mode == "provisioned" - "'engine_version' in _result_modify_db_parameter_group_name" diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_promote.yml b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_promote.yml index f43f41fad18..8443063add8 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_promote.yml +++ b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_promote.yml @@ -47,7 +47,7 @@ - "'engine' in _result_create_src_db_cluster" - _result_create_src_db_cluster.engine == "{{ engine }}" - "'engine_mode' in _result_create_src_db_cluster" - - _result_create_src_db_cluster.engine_mode == "provisioned" + - _result_create_src_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_create_src_db_cluster" - "'master_username' in _result_create_src_db_cluster" - _result_create_src_db_cluster.master_username == "{{ username }}" @@ -103,7 +103,7 @@ - "'engine' in _result_create_replica_db_cluster" - _result_create_replica_db_cluster.engine == "{{ engine }}" - "'engine_mode' in _result_create_replica_db_cluster" - - _result_create_replica_db_cluster.engine_mode == "provisioned" + - _result_create_replica_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_create_replica_db_cluster" - "'master_username' in _result_create_replica_db_cluster" - _result_create_replica_db_cluster.master_username == "{{ username }}" diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_restore.yml b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_restore.yml index 8240cda579d..b991a457baf 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_restore.yml +++ b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_restore.yml @@ -41,7 +41,7 @@ - "'engine' in _result_create_source_db_cluster" - _result_create_source_db_cluster.engine == "{{ engine }}" - "'engine_mode' in _result_create_source_db_cluster" - - _result_create_source_db_cluster.engine_mode == "provisioned" + - _result_create_source_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_create_source_db_cluster" - "'master_username' in _result_create_source_db_cluster" - _result_create_source_db_cluster.master_username == "{{ username }}" @@ -49,7 +49,7 @@ - _result_create_source_db_cluster.port == {{ port }} - "'status' in _result_create_source_db_cluster" - _result_create_source_db_cluster.status == 'available' - - _result_create_source_db_cluster.storage_encrypted == false + - _result_create_source_db_cluster.storage_encrypted == true - "'tags' in _result_create_source_db_cluster" - "'vpc_security_groups' in _result_create_source_db_cluster" @@ -83,7 +83,7 @@ - "'engine' in _result_restored_db_cluster" - _result_restored_db_cluster.engine == "{{ engine }}" - "'engine_mode' in _result_restored_db_cluster" - - _result_restored_db_cluster.engine_mode == "provisioned" + - _result_restored_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_restored_db_cluster" - "'master_username' in _result_restored_db_cluster" - _result_restored_db_cluster.master_username == "{{ username }}" @@ -152,7 +152,7 @@ - "'engine' in _result_restored_db_cluster" - _result_restored_db_cluster.engine == "{{ engine }}" - "'engine_mode' in _result_restored_db_cluster" - - _result_restored_db_cluster.engine_mode == "provisioned" + - _result_restored_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_restored_db_cluster" - "'master_username' in _result_restored_db_cluster" - _result_restored_db_cluster.master_username == "{{ username }}" diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_tag.yml b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_tag.yml index e2130fa891e..be0fa3ee385 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_tag.yml +++ b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_tag.yml @@ -39,7 +39,7 @@ - "'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" + - _result_create_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_create_db_cluster" - "'master_username' in _result_create_db_cluster" - _result_create_db_cluster.master_username == "{{ username }}" @@ -47,7 +47,7 @@ - _result_create_db_cluster.port == {{ port }} - "'status' in _result_create_db_cluster" - _result_create_db_cluster.status == 'available' - - _result_create_db_cluster.storage_encrypted == false + - _result_create_db_cluster.storage_encrypted == true - "'tags' in _result_create_db_cluster" - _result_create_db_cluster.tags | length == 2 - _result_create_db_cluster.tags["Created_By"] == "{{ tags_create["Created_By"] @@ -81,7 +81,7 @@ - "'engine' in _result_tag_db_cluster" - _result_tag_db_cluster.engine == "{{ engine }}" - "'engine_mode' in _result_tag_db_cluster" - - _result_tag_db_cluster.engine_mode == "provisioned" + - _result_tag_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_tag_db_cluster" - "'master_username' in _result_tag_db_cluster" - _result_tag_db_cluster.master_username == "{{ username }}" @@ -89,7 +89,7 @@ - _result_tag_db_cluster.port == {{ port }} - "'status' in _result_tag_db_cluster" - _result_tag_db_cluster.status == 'available' - - _result_tag_db_cluster.storage_encrypted == false + - _result_tag_db_cluster.storage_encrypted == true - "'tags' in _result_tag_db_cluster" - _result_tag_db_cluster.tags | length == 2 - _result_tag_db_cluster.tags["Created_By"] == "{{ tags_create["Created_By"] @@ -120,7 +120,7 @@ - "'engine' in _result_tag_db_cluster" - _result_tag_db_cluster.engine == "{{ engine }}" - "'engine_mode' in _result_tag_db_cluster" - - _result_tag_db_cluster.engine_mode == "provisioned" + - _result_tag_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_tag_db_cluster" - "'master_username' in _result_tag_db_cluster" - _result_tag_db_cluster.master_username == "{{ username }}" @@ -128,7 +128,7 @@ - _result_tag_db_cluster.port == {{ port }} - "'status' in _result_tag_db_cluster" - _result_tag_db_cluster.status == 'available' - - _result_tag_db_cluster.storage_encrypted == false + - _result_tag_db_cluster.storage_encrypted == true - "'tags' in _result_tag_db_cluster" - _result_tag_db_cluster.tags | length == 2 - _result_tag_db_cluster.tags["Name"] == "{{ tags_patch['Name'] }}" @@ -175,7 +175,7 @@ - "'engine' in _result_tag_db_cluster" - _result_tag_db_cluster.engine == "{{ engine }}" - "'engine_mode' in _result_tag_db_cluster" - - _result_tag_db_cluster.engine_mode == "provisioned" + - _result_tag_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_tag_db_cluster" - "'master_username' in _result_tag_db_cluster" - _result_tag_db_cluster.master_username == "{{ username }}" @@ -183,7 +183,7 @@ - _result_tag_db_cluster.port == {{ port }} - "'status' in _result_tag_db_cluster" - _result_tag_db_cluster.status == 'available' - - _result_tag_db_cluster.storage_encrypted == false + - _result_tag_db_cluster.storage_encrypted == true - "'tags' in _result_tag_db_cluster" - _result_tag_db_cluster.tags | length == 1 - _result_tag_db_cluster.tags["Created_By"] == "Ansible_rds_cluster_integration_test" @@ -230,7 +230,7 @@ - "'engine' in _result_tag_db_cluster" - _result_tag_db_cluster.engine == "{{ engine }}" - "'engine_mode' in _result_tag_db_cluster" - - _result_tag_db_cluster.engine_mode == "provisioned" + - _result_tag_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_tag_db_cluster" - "'master_username' in _result_tag_db_cluster" - _result_tag_db_cluster.master_username == "{{ username }}" @@ -238,7 +238,7 @@ - _result_tag_db_cluster.port == {{ port }} - "'status' in _result_tag_db_cluster" - _result_tag_db_cluster.status == 'available' - - _result_tag_db_cluster.storage_encrypted == false + - _result_tag_db_cluster.storage_encrypted == true - "'tags' in _result_tag_db_cluster" - _result_tag_db_cluster.tags | length == 2 - _result_tag_db_cluster.tags["Created_By"] == "{{ tags_create["Created_By"]}}" @@ -269,7 +269,7 @@ - "'engine' in _result_tag_db_cluster" - _result_tag_db_cluster.engine == "{{ engine }}" - "'engine_mode' in _result_tag_db_cluster" - - _result_tag_db_cluster.engine_mode == "provisioned" + - _result_tag_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_tag_db_cluster" - "'master_username' in _result_tag_db_cluster" - _result_tag_db_cluster.master_username == "{{ username }}" @@ -277,7 +277,7 @@ - _result_tag_db_cluster.port == {{ port }} - "'status' in _result_tag_db_cluster" - _result_tag_db_cluster.status == 'available' - - _result_tag_db_cluster.storage_encrypted == false + - _result_tag_db_cluster.storage_encrypted == true - "'tags' in _result_tag_db_cluster" - _result_tag_db_cluster.tags | length == 0 - "'vpc_security_groups' in _result_tag_db_cluster" diff --git a/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml b/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml index a60469fe8aa..a105044d9ca 100644 --- a/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml +++ b/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml @@ -35,7 +35,7 @@ - "'engine' in _result_create_source_db_cluster" - _result_create_source_db_cluster.engine == "{{ engine }}" - "'engine_mode' in _result_create_source_db_cluster" - - _result_create_source_db_cluster.engine_mode == "provisioned" + - _result_create_source_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_create_source_db_cluster" - "'master_username' in _result_create_source_db_cluster" - _result_create_source_db_cluster.master_username == "{{ username }}" @@ -149,7 +149,7 @@ - "'engine' in _result_create_source_db_cluster" - _result_create_source_db_cluster.engine == "{{ engine }}" - "'engine_mode' in _result_create_source_db_cluster" - - _result_create_source_db_cluster.engine_mode == "provisioned" + - _result_create_source_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_create_source_db_cluster" - "'master_username' in _result_create_source_db_cluster" - _result_create_source_db_cluster.master_username == "{{ username }}" diff --git a/tests/integration/targets/rds_instance_aurora/aliases b/tests/integration/targets/rds_instance_aurora/aliases index 7a963e00518..bff4494c2ce 100644 --- a/tests/integration/targets/rds_instance_aurora/aliases +++ b/tests/integration/targets/rds_instance_aurora/aliases @@ -1,5 +1,3 @@ -# See: https://github.com/ansible-collections/amazon.aws/pull/1192 -disabled cloud/aws time=30m rds_instance diff --git a/tests/integration/targets/rds_instance_aurora/tasks/main.yml b/tests/integration/targets/rds_instance_aurora/tasks/main.yml index ff6f7177ff7..522894afce5 100644 --- a/tests/integration/targets/rds_instance_aurora/tasks/main.yml +++ b/tests/integration/targets/rds_instance_aurora/tasks/main.yml @@ -16,27 +16,27 @@ skip_final_snapshot: true register: result - - assert: - that: - - not result.changed - ignore_errors: yes - - name: Create minimal aurora cluster in default VPC and default subnet group rds_cluster: state: present - engine: aurora + engine: aurora-postgresql engine_mode: provisioned cluster_id: '{{ cluster_id }}' username: '{{ username }}' password: '{{ password }}' tags: CreatedBy: rds_instance integration tests + register: my_cluster + + - assert: + that: + - my_cluster.engine_mode == "provisioned" - name: Create an Aurora instance rds_instance: id: '{{ instance_id }}' cluster_id: '{{ cluster_id }}' - engine: aurora + engine: aurora-postgresql state: present db_instance_class: '{{ aurora_db_instance_class }}' tags: @@ -53,7 +53,7 @@ rds_instance: id: '{{ instance_id }}-new' cluster_id: '{{ cluster_id }}' - engine: aurora + engine: aurora-postgresql state: present username: '{{ username }}' password: '{{ password }}'