From 2a15aedc91c2fccbbfdf5a686433741cca999ff4 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 | 36 ++++++++++++++++++- .../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 ++++----- 11 files changed, 84 insertions(+), 45 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 77d06d25770..84a2b8034a4 100644 --- a/plugins/modules/rds_cluster.py +++ b/plugins/modules/rds_cluster.py @@ -171,11 +171,27 @@ engine: description: - The name of the database engine to be used for this DB cluster. This is required to create a 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: - aurora - aurora-mysql - aurora-postgresql 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. @@ -389,6 +405,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''' @@ -669,7 +702,7 @@ def get_create_options(params_dict): 'AvailabilityZones', 'BacktrackWindow', 'BackupRetentionPeriod', 'PreferredBackupWindow', 'CharacterSetName', 'DBClusterIdentifier', 'DBClusterParameterGroupName', 'DBSubnetGroupName', 'DatabaseName', 'EnableCloudwatchLogsExports', 'EnableIAMDatabaseAuthentication', 'KmsKeyId', - 'Engine', 'EngineVersion', 'PreferredMaintenanceWindow', 'MasterUserPassword', 'MasterUsername', + 'Engine', 'EngineMode', 'EngineVersion', 'PreferredMaintenanceWindow', 'MasterUserPassword', 'MasterUsername', 'OptionGroupName', 'Port', 'ReplicationSourceIdentifier', 'SourceRegion', 'StorageEncrypted', 'Tags', 'VpcSecurityGroupIds', 'EngineMode', 'ScalingConfiguration', 'DeletionProtection', 'EnableHttpEndpoint', 'CopyTagsToSnapshot', 'Domain', 'DomainIAMRoleName', @@ -924,6 +957,7 @@ def main(): enable_global_write_forwarding=dict(type='bool'), enable_iam_database_authentication=dict(type='bool'), engine=dict(choices=["aurora", "aurora-mysql", "aurora-postgresql"]), + engine_mode=dict(choices=["provisioned", "serverless", "parallelquery", "global", "multimaster"]), engine_version=dict(), final_snapshot_identifier=dict(), force_backtrack=dict(type='bool'), 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 9a72d5abb3a..c2479e112e8 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 dc6518974ac..cfec27ab554 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 @@ -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" @@ -167,7 +171,7 @@ - name: Create DB cluster parameter group if not exists command: aws rds create-db-cluster-parameter-group --db-cluster-parameter-group-name - {{ new_db_parameter_group_name }} --db-parameter-group-family aurora5.6 --description + {{ new_db_parameter_group_name }} --db-parameter-group-family aurora-mysql5.7 --description "Test DB cluster parameter group" environment: AWS_ACCESS_KEY_ID: '{{ aws_access_key }}' @@ -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 461a588ec83..777fbe40a66 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=15m 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 }}'