Skip to content
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

Add support for Aurora Serverless v2 #24363

Conversation

njoerd114
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

This PR enhances the aws_rds_cluster resource with a new configuration block serverlessv2_scaling_configuration and adds tests to ensure compatibility with Aurora Serverless v2.

This PR can only be merged after updating the github.com/aws/aws-sdk-go to at least 1.43.43, thus:
Relates #24352
Closes #24349

Output from acceptance testing:

$ make testacc TESTS=TestAccRDSClusterInstance_AuroraServerlessV2 PKG=rds
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSClusterInstance_AuroraServerlessV2'  -timeout 180m
=== RUN   TestAccRDSClusterInstance_AuroraServerlessV2
=== PAUSE TestAccRDSClusterInstance_AuroraServerlessV2
=== CONT  TestAccRDSClusterInstance_AuroraServerlessV2
--- PASS: TestAccRDSClusterInstance_AuroraServerlessV2 (1567.06s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	1567.090s

$ make testacc TESTS=TestAccRDSCluster_scalingv2 PKG=rds                           
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSCluster_scalingv2'  -timeout 180m
=== RUN   TestAccRDSCluster_scalingv2
=== PAUSE TestAccRDSCluster_scalingv2
=== CONT  TestAccRDSCluster_scalingv2
--- PASS: TestAccRDSCluster_scalingv2 (222.41s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	222.448s

$ make testacc TESTS=TestAccRDSCluster_serverlessv2_Scaling_defaultMinCapacity PKG=rds
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSCluster_serverlessv2_Scaling_defaultMinCapacity'  -timeout 180m
=== RUN   TestAccRDSCluster_serverlessv2_Scaling_defaultMinCapacity
=== PAUSE TestAccRDSCluster_serverlessv2_Scaling_defaultMinCapacity
=== CONT  TestAccRDSCluster_serverlessv2_Scaling_defaultMinCapacity
--- PASS: TestAccRDSCluster_serverlessv2_Scaling_defaultMinCapacity (166.30s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	166.335s

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/rds Issues and PRs that pertain to the rds service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. labels Apr 22, 2022
@github-actions
Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 22, 2022
@travis-jorge
Copy link
Contributor

Any ETA on when this will be made available?

@jtbrush56
Copy link

+1 on making this available. My team is actively waiting on this to be released so we can deploy v2.

internal/service/rds/cluster.go Outdated Show resolved Hide resolved
internal/service/rds/cluster.go Outdated Show resolved Hide resolved
…and 'serverlessv2_scaling_configuration.min_capacity' are Required.

Acceptance test output:

% make testacc TESTS=TestAccRDSCluster_serverlessV2ScalingConfiguration PKG=rds
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSCluster_serverlessV2ScalingConfiguration'  -timeout 180m
=== RUN   TestAccRDSCluster_serverlessV2ScalingConfiguration
=== PAUSE TestAccRDSCluster_serverlessV2ScalingConfiguration
=== CONT  TestAccRDSCluster_serverlessV2ScalingConfiguration
--- PASS: TestAccRDSCluster_serverlessV2ScalingConfiguration (235.67s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	245.624s
@github-actions github-actions bot added provider Pertains to the provider itself, rather than any interaction with AWS. size/L Managed by automation to categorize the size of a PR. and removed size/XL Managed by automation to categorize the size of a PR. labels Apr 26, 2022
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Apr 26, 2022
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

% ACCTEST_TIMEOUT=360m make testacc TESTS=TestAccRDSCluster_ PKG=rds ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 3 -run='TestAccRDSCluster_'  -timeout 360m
=== RUN   TestAccRDSCluster_basic
=== PAUSE TestAccRDSCluster_basic
=== RUN   TestAccRDSCluster_allowMajorVersionUpgrade
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgrade
=== RUN   TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm
=== RUN   TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters
=== RUN   TestAccRDSCluster_onlyMajorVersion
=== PAUSE TestAccRDSCluster_onlyMajorVersion
=== RUN   TestAccRDSCluster_availabilityZones
=== PAUSE TestAccRDSCluster_availabilityZones
=== RUN   TestAccRDSCluster_storageType
=== PAUSE TestAccRDSCluster_storageType
=== RUN   TestAccRDSCluster_allocatedStorage
=== PAUSE TestAccRDSCluster_allocatedStorage
=== RUN   TestAccRDSCluster_iops
=== PAUSE TestAccRDSCluster_iops
=== RUN   TestAccRDSCluster_dbClusterInstanceClass
=== PAUSE TestAccRDSCluster_dbClusterInstanceClass
=== RUN   TestAccRDSCluster_backtrackWindow
=== PAUSE TestAccRDSCluster_backtrackWindow
=== RUN   TestAccRDSCluster_clusterIdentifierPrefix
=== PAUSE TestAccRDSCluster_clusterIdentifierPrefix
=== RUN   TestAccRDSCluster_dbSubnetGroupName
=== PAUSE TestAccRDSCluster_dbSubnetGroupName
=== RUN   TestAccRDSCluster_s3Restore
=== PAUSE TestAccRDSCluster_s3Restore
=== RUN   TestAccRDSCluster_pointInTimeRestore
=== PAUSE TestAccRDSCluster_pointInTimeRestore
=== RUN   TestAccRDSCluster_PointInTimeRestore_enabledCloudWatchLogsExports
=== PAUSE TestAccRDSCluster_PointInTimeRestore_enabledCloudWatchLogsExports
=== RUN   TestAccRDSCluster_generatedName
=== PAUSE TestAccRDSCluster_generatedName
=== RUN   TestAccRDSCluster_takeFinalSnapshot
=== PAUSE TestAccRDSCluster_takeFinalSnapshot
=== RUN   TestAccRDSCluster_missingUserNameCausesError
=== PAUSE TestAccRDSCluster_missingUserNameCausesError
=== RUN   TestAccRDSCluster_tags
=== PAUSE TestAccRDSCluster_tags
=== RUN   TestAccRDSCluster_EnabledCloudWatchLogsExports_mySQL
=== PAUSE TestAccRDSCluster_EnabledCloudWatchLogsExports_mySQL
=== RUN   TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql
=== PAUSE TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql
=== RUN   TestAccRDSCluster_updateIAMRoles
=== PAUSE TestAccRDSCluster_updateIAMRoles
=== RUN   TestAccRDSCluster_kmsKey
=== PAUSE TestAccRDSCluster_kmsKey
=== RUN   TestAccRDSCluster_encrypted
=== PAUSE TestAccRDSCluster_encrypted
=== RUN   TestAccRDSCluster_copyTagsToSnapshot
=== PAUSE TestAccRDSCluster_copyTagsToSnapshot
=== RUN   TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID
=== PAUSE TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID
=== RUN   TestAccRDSCluster_backupsUpdate
=== PAUSE TestAccRDSCluster_backupsUpdate
=== RUN   TestAccRDSCluster_iamAuth
=== PAUSE TestAccRDSCluster_iamAuth
=== RUN   TestAccRDSCluster_deletionProtection
=== PAUSE TestAccRDSCluster_deletionProtection
=== RUN   TestAccRDSCluster_engineMode
=== PAUSE TestAccRDSCluster_engineMode
=== RUN   TestAccRDSCluster_EngineMode_global
=== PAUSE TestAccRDSCluster_EngineMode_global
=== RUN   TestAccRDSCluster_EngineMode_multiMaster
=== PAUSE TestAccRDSCluster_EngineMode_multiMaster
=== RUN   TestAccRDSCluster_EngineMode_parallelQuery
=== PAUSE TestAccRDSCluster_EngineMode_parallelQuery
=== RUN   TestAccRDSCluster_engineVersion
=== PAUSE TestAccRDSCluster_engineVersion
=== RUN   TestAccRDSCluster_engineVersionWithPrimaryInstance
=== PAUSE TestAccRDSCluster_engineVersionWithPrimaryInstance
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineMode_global
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineMode_global
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_add
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_add
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_remove
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_remove
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_update
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_update
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineMode_provisioned
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineMode_provisioned
=== RUN   TestAccRDSCluster_GlobalClusterIdentifier_primarySecondaryClusters
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifier_primarySecondaryClusters
=== RUN   TestAccRDSCluster_GlobalClusterIdentifier_replicationSourceIdentifier
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifier_replicationSourceIdentifier
=== RUN   TestAccRDSCluster_GlobalClusterIdentifier_secondaryClustersWriteForwarding
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifier_secondaryClustersWriteForwarding
=== RUN   TestAccRDSCluster_port
=== PAUSE TestAccRDSCluster_port
=== RUN   TestAccRDSCluster_scaling
=== PAUSE TestAccRDSCluster_scaling
=== RUN   TestAccRDSCluster_serverlessV2ScalingConfiguration
=== PAUSE TestAccRDSCluster_serverlessV2ScalingConfiguration
=== RUN   TestAccRDSCluster_Scaling_defaultMinCapacity
=== PAUSE TestAccRDSCluster_Scaling_defaultMinCapacity
=== RUN   TestAccRDSCluster_snapshotIdentifier
=== PAUSE TestAccRDSCluster_snapshotIdentifier
=== RUN   TestAccRDSCluster_SnapshotIdentifier_deletionProtection
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_deletionProtection
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineMode_parallelQuery
=== PAUSE TestAccRDSCluster_SnapshotIdentifierEngineMode_parallelQuery
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineMode_provisioned
=== PAUSE TestAccRDSCluster_SnapshotIdentifierEngineMode_provisioned
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineMode_serverless
    cluster_test.go:1669: serverless does not support snapshot restore on an empty volume
--- SKIP: TestAccRDSCluster_SnapshotIdentifierEngineMode_serverless (0.00s)
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineVersion_different
=== PAUSE TestAccRDSCluster_SnapshotIdentifierEngineVersion_different
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineVersion_equal
=== PAUSE TestAccRDSCluster_SnapshotIdentifierEngineVersion_equal
=== RUN   TestAccRDSCluster_SnapshotIdentifier_kmsKeyID
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_kmsKeyID
=== RUN   TestAccRDSCluster_SnapshotIdentifier_masterPassword
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_masterPassword
=== RUN   TestAccRDSCluster_SnapshotIdentifier_masterUsername
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_masterUsername
=== RUN   TestAccRDSCluster_SnapshotIdentifier_preferredBackupWindow
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_preferredBackupWindow
=== RUN   TestAccRDSCluster_SnapshotIdentifier_preferredMaintenanceWindow
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_preferredMaintenanceWindow
=== RUN   TestAccRDSCluster_SnapshotIdentifier_tags
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_tags
=== RUN   TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs
=== RUN   TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags
=== PAUSE TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags
=== RUN   TestAccRDSCluster_SnapshotIdentifier_encryptedRestore
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_encryptedRestore
=== RUN   TestAccRDSCluster_enableHTTPEndpoint
=== PAUSE TestAccRDSCluster_enableHTTPEndpoint
=== CONT  TestAccRDSCluster_basic
=== CONT  TestAccRDSCluster_EngineMode_multiMaster
=== CONT  TestAccRDSCluster_snapshotIdentifier
--- PASS: TestAccRDSCluster_basic (130.12s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifierEngineMode_provisioned
--- PASS: TestAccRDSCluster_EngineMode_multiMaster (154.92s)
=== CONT  TestAccRDSCluster_Scaling_defaultMinCapacity
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineMode_provisioned (152.80s)
=== CONT  TestAccRDSCluster_serverlessV2ScalingConfiguration
--- PASS: TestAccRDSCluster_snapshotIdentifier (410.56s)
=== CONT  TestAccRDSCluster_scaling
--- PASS: TestAccRDSCluster_Scaling_defaultMinCapacity (331.46s)
=== CONT  TestAccRDSCluster_port
--- PASS: TestAccRDSCluster_serverlessV2ScalingConfiguration (236.29s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifier_secondaryClustersWriteForwarding
--- PASS: TestAccRDSCluster_port (180.84s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifier_replicationSourceIdentifier
--- PASS: TestAccRDSCluster_scaling (365.66s)
=== CONT  TestAccRDSCluster_enableHTTPEndpoint
=== CONT  TestAccRDSCluster_GlobalClusterIdentifier_replicationSourceIdentifier
    cluster_test.go:1330: Step 1/1 error: Error running apply: exit status 1
        
        Error: error reading EC2 VPC (vpc-02209b6a1565fac06) Attribute (enableDnsHostnames): couldn't find resource
        
          with aws_vpc.alternate,
          on terraform_plugin_test.tf line 53, in resource "aws_vpc" "alternate":
          53: resource "aws_vpc" "alternate" {
        
--- PASS: TestAccRDSCluster_enableHTTPEndpoint (394.88s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_encryptedRestore
--- FAIL: TestAccRDSCluster_GlobalClusterIdentifier_replicationSourceIdentifier (681.75s)
=== CONT  TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags
--- PASS: TestAccRDSCluster_SnapshotIdentifier_encryptedRestore (391.51s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs
--- PASS: TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags (406.38s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_tags
--- PASS: TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs (384.54s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_preferredMaintenanceWindow
--- PASS: TestAccRDSCluster_SnapshotIdentifier_tags (389.60s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_preferredBackupWindow
--- PASS: TestAccRDSCluster_SnapshotIdentifier_preferredMaintenanceWindow (368.36s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_masterUsername
--- PASS: TestAccRDSCluster_SnapshotIdentifier_preferredBackupWindow (451.64s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_masterPassword
--- PASS: TestAccRDSCluster_GlobalClusterIdentifier_secondaryClustersWriteForwarding (2205.59s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_kmsKeyID
--- PASS: TestAccRDSCluster_SnapshotIdentifier_masterUsername (473.83s)
=== CONT  TestAccRDSCluster_SnapshotIdentifierEngineVersion_equal
--- PASS: TestAccRDSCluster_SnapshotIdentifier_masterPassword (431.75s)
=== CONT  TestAccRDSCluster_SnapshotIdentifierEngineVersion_different
--- PASS: TestAccRDSCluster_SnapshotIdentifier_kmsKeyID (388.98s)
=== CONT  TestAccRDSCluster_SnapshotIdentifierEngineMode_provisioned
--- PASS: TestAccRDSCluster_SnapshotIdentifierEngineVersion_equal (368.68s)
=== CONT  TestAccRDSCluster_SnapshotIdentifierEngineMode_parallelQuery
--- PASS: TestAccRDSCluster_SnapshotIdentifierEngineVersion_different (401.72s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_deletionProtection
--- PASS: TestAccRDSCluster_SnapshotIdentifierEngineMode_provisioned (431.16s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_remove
--- PASS: TestAccRDSCluster_SnapshotIdentifierEngineMode_parallelQuery (445.52s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_update
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_remove (168.47s)
=== CONT  TestAccRDSCluster_engineVersion
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_update (158.84s)
=== CONT  TestAccRDSCluster_engineVersionWithPrimaryInstance
    cluster_test.go:1119: Step 1/2 error: Error running pre-apply refresh: exit status 1
        
        Error: multiple RDS engine versions ([{
          DBEngineDescription: "Aurora (PostgreSQL)",
          DBEngineVersionDescription: "Aurora PostgreSQL (Compatible with PostgreSQL 10.14)",
          DBParameterGroupFamily: "aurora-postgresql10",
          Engine: "aurora-postgresql",
          EngineVersion: "10.14",
          ExportableLogTypes: ["postgresql"],
          MajorEngineVersion: "10",
          Status: "available",
          SupportedEngineModes: ["provisioned"],
          SupportedFeatureNames: [
            "Comprehend",
            "s3Export",
            "s3Import",
            "SageMaker"
          ],
          SupportsBabelfish: false,
          SupportsGlobalDatabases: true,
          SupportsLogExportsToCloudwatchLogs: true,
          SupportsParallelQuery: false,
          SupportsReadReplica: false,
          ValidUpgradeTarget: [
            {
              AutoUpgrade: false,
              Description: "Aurora PostgreSQL (Compatible with PostgreSQL 10.16)",
              Engine: "aurora-postgresql",
              EngineVersion: "10.16",
              IsMajorVersionUpgrade: false,
              SupportedEngineModes: ["provisioned"],
              SupportsBabelfish: false,
              SupportsGlobalDatabases: true,
              SupportsParallelQuery: false
            },
            {
              AutoUpgrade: false,
              Description: "Aurora PostgreSQL (Compatible with PostgreSQL 10.17)",
              Engine: "aurora-postgresql",
              EngineVersion: "10.17",
              IsMajorVersionUpgrade: false,
              SupportedEngineModes: ["provisioned"],
              SupportsBabelfish: false,
              SupportsGlobalDatabases: true,
              SupportsParallelQuery: false
            },
            {
              AutoUpgrade: true,
              Description: "Aurora PostgreSQL (Compatible with PostgreSQL 10.18)",
              Engine: "aurora-postgresql",
              EngineVersion: "10.18",
              IsMajorVersionUpgrade: false,
              SupportedEngineModes: ["provisioned"],
              SupportsBabelfish: false,
              SupportsGlobalDatabases: true,
              SupportsParallelQuery: false
            },
            {
              AutoUpgrade: false,
              Description: "Aurora PostgreSQL (Compatible with PostgreSQL 10.19)",
              Engine: "aurora-postgresql",
              EngineVersion: "10.19",
              IsMajorVersionUpgrade: false,
              SupportedEngineModes: ["provisioned"],
              SupportsBabelfish: false,
              SupportsGlobalDatabases: true,
              SupportsParallelQuery: false
            },
            {
              AutoUpgrade: false,
              Description: "Aurora PostgreSQL (Compatible with PostgreSQL 10.20)",
              Engine: "aurora-postgresql",
              EngineVersion: "10.20",
              IsMajorVersionUpgrade: false,
              SupportedEngineModes: ["provisioned"],
              SupportsBabelfish: false,
              SupportsGlobalDatabases: true,
              SupportsParallelQuery: false
            },
            {
              AutoUpgrade: false,
              Description: "Aurora PostgreSQL (Compatible with PostgreSQL 11.9)",
              Engine: "aurora-postgresql",
              EngineVersion: "11.9",
              IsMajorVersionUpgrade: true,
              SupportedEngineModes: ["provisioned"],
              SupportsBabelfish: false,
              SupportsGlobalDatabases: true,
              SupportsParallelQuery: false
            },
            {
              AutoUpgrade: false,
              Description: "Aurora PostgreSQL (Compatible with PostgreSQL 11.11)",
              Engine: "aurora-postgresql",
              EngineVersion: "11.11",
              IsMajorVersionUpgrade: true,
              SupportedEngineModes: ["provisioned"],
              SupportsBabelfish: false,
              SupportsGlobalDatabases: true,
              SupportsParallelQuery: false
            },
            {
              AutoUpgrade: false,
              Description: "Aurora PostgreSQL (Compatible with PostgreSQL 11.12)",
              Engine: "aurora-postgresql",
              EngineVersion: "11.12",
              IsMajorVersionUpgrade: true,
              SupportedEngineModes: ["provisioned"],
              SupportsBabelfish: false,
              SupportsGlobalDatabases: true,
              SupportsParallelQuery: false
            },
            {
              AutoUpgrade: false,
              Description: "Aurora PostgreSQL (Compatible with PostgreSQL 11.13)",
              Engine: "aurora-postgresql",
              EngineVersion: "11.13",
              IsMajorVersionUpgrade: true,
              SupportedEngineModes: ["provisioned"],
              SupportsBabelfish: false,
              SupportsGlobalDatabases: true,
              SupportsParallelQuery: false
            },
            {
              AutoUpgrade: false,
              Description: "Aurora PostgreSQL (Compatible with PostgreSQL 11.14)",
              Engine: "aurora-postgresql",
              EngineVersion: "11.14",
              IsMajorVersionUpgrade: true,
              SupportedEngineModes: ["provisioned"],
              SupportsBabelfish: false,
              SupportsGlobalDatabases: true,
              SupportsParallelQuery: false
            },
            {
              AutoUpgrade: false,
              Description: "Aurora PostgreSQL (Compatible with PostgreSQL 11.15)",
              Engine: "aurora-postgresql",
              EngineVersion: "11.15",
              IsMajorVersionUpgrade: true,
              SupportedEngineModes: ["provisioned"],
              SupportsBabelfish: false,
              SupportsGlobalDatabases: true,
              SupportsParallelQuery: false
            }
          ]
        } {
 ...
        }]) match the criteria
        
          with data.aws_rds_engine_version.test,
          on terraform_plugin_test.tf line 2, in data "aws_rds_engine_version" "test":
           2: data "aws_rds_engine_version" "test" {
        
--- FAIL: TestAccRDSCluster_engineVersionWithPrimaryInstance (3.35s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifier_primarySecondaryClusters
--- PASS: TestAccRDSCluster_SnapshotIdentifier_deletionProtection (490.75s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_add
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_add (155.59s)
=== CONT  TestAccRDSCluster_generatedName
--- PASS: TestAccRDSCluster_engineVersion (468.41s)
=== CONT  TestAccRDSCluster_EngineMode_global
--- PASS: TestAccRDSCluster_generatedName (126.00s)
=== CONT  TestAccRDSCluster_iops
--- PASS: TestAccRDSCluster_EngineMode_global (173.33s)
=== CONT  TestAccRDSCluster_engineMode
--- PASS: TestAccRDSCluster_engineMode (427.09s)
=== CONT  TestAccRDSCluster_deletionProtection
--- PASS: TestAccRDSCluster_deletionProtection (190.24s)
=== CONT  TestAccRDSCluster_PointInTimeRestore_enabledCloudWatchLogsExports
--- PASS: TestAccRDSCluster_PointInTimeRestore_enabledCloudWatchLogsExports (361.60s)
=== CONT  TestAccRDSCluster_pointInTimeRestore
--- PASS: TestAccRDSCluster_iops (1364.78s)
=== CONT  TestAccRDSCluster_s3Restore
--- PASS: TestAccRDSCluster_GlobalClusterIdentifier_primarySecondaryClusters (1883.80s)
=== CONT  TestAccRDSCluster_dbSubnetGroupName
--- PASS: TestAccRDSCluster_pointInTimeRestore (340.59s)
=== CONT  TestAccRDSCluster_GlobalClusterIdentifierEngineMode_global
--- PASS: TestAccRDSCluster_GlobalClusterIdentifierEngineMode_global (132.75s)
=== CONT  TestAccRDSCluster_EngineMode_parallelQuery
--- PASS: TestAccRDSCluster_dbSubnetGroupName (194.78s)
=== CONT  TestAccRDSCluster_updateIAMRoles
--- PASS: TestAccRDSCluster_EngineMode_parallelQuery (167.99s)
=== CONT  TestAccRDSCluster_iamAuth
--- PASS: TestAccRDSCluster_updateIAMRoles (146.27s)
=== CONT  TestAccRDSCluster_clusterIdentifierPrefix
--- PASS: TestAccRDSCluster_iamAuth (147.96s)
=== CONT  TestAccRDSCluster_backupsUpdate
--- PASS: TestAccRDSCluster_clusterIdentifierPrefix (178.89s)
=== CONT  TestAccRDSCluster_backtrackWindow
--- PASS: TestAccRDSCluster_backupsUpdate (221.13s)
=== CONT  TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID
--- PASS: TestAccRDSCluster_backtrackWindow (233.44s)
=== CONT  TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql
=== CONT  TestAccRDSCluster_s3Restore
    cluster_test.go:481: Step 1/1 error: Error running apply: exit status 1
        
        Error: Error waiting for RDS Cluster state to be "available": unexpected state 'migration-failed', wanted target 'available'. last error: %!s(<nil>)
        
          with aws_rds_cluster.test,
          on terraform_plugin_test.tf line 74, in resource "aws_rds_cluster" "test":
          74: resource "aws_rds_cluster" "test" {
        
--- PASS: TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql (174.30s)
=== CONT  TestAccRDSCluster_dbClusterInstanceClass
--- FAIL: TestAccRDSCluster_s3Restore (1498.03s)
=== CONT  TestAccRDSCluster_copyTagsToSnapshot
--- PASS: TestAccRDSCluster_copyTagsToSnapshot (224.36s)
=== CONT  TestAccRDSCluster_missingUserNameCausesError
--- PASS: TestAccRDSCluster_missingUserNameCausesError (6.22s)
=== CONT  TestAccRDSCluster_encrypted
--- PASS: TestAccRDSCluster_encrypted (188.86s)
=== CONT  TestAccRDSCluster_EnabledCloudWatchLogsExports_mySQL
--- PASS: TestAccRDSCluster_EnabledCloudWatchLogsExports_mySQL (212.46s)
=== CONT  TestAccRDSCluster_tags
--- PASS: TestAccRDSCluster_dbClusterInstanceClass (1202.90s)
=== CONT  TestAccRDSCluster_takeFinalSnapshot
--- PASS: TestAccRDSCluster_tags (192.38s)
=== CONT  TestAccRDSCluster_kmsKey
--- PASS: TestAccRDSCluster_takeFinalSnapshot (160.70s)
=== CONT  TestAccRDSCluster_storageType
--- PASS: TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID (1638.46s)
=== CONT  TestAccRDSCluster_allocatedStorage
--- PASS: TestAccRDSCluster_kmsKey (152.71s)
=== CONT  TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm
--- PASS: TestAccRDSCluster_storageType (1149.81s)
=== CONT  TestAccRDSCluster_onlyMajorVersion
--- PASS: TestAccRDSCluster_allocatedStorage (1212.07s)
=== CONT  TestAccRDSCluster_allowMajorVersionUpgrade
--- PASS: TestAccRDSCluster_onlyMajorVersion (712.07s)
=== CONT  TestAccRDSCluster_availabilityZones
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm (1860.76s)
=== CONT  TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters
--- PASS: TestAccRDSCluster_availabilityZones (137.86s)
--- PASS: TestAccRDSCluster_allowMajorVersionUpgrade (1716.10s)
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters (1992.56s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/rds	11899.468s
FAIL
make: *** [testacc] Error 1

Failures are unrelated to this change and occur in nightly CI.

@ewbankkit
Copy link
Contributor

@njoerd114 Thanks for the contribution 🎉 👏.

@njoerd114
Copy link
Contributor Author

@njoerd114 Thanks for the contribution 🎉 👏.

Thanks for the fixes and further optimisations, gonna look through all of them tomorrow and try understanding them. I’m new to both golang and enhancing providers, so it’s gonna be a great learning resource to me. 👏

@ewbankkit ewbankkit merged commit 07b55c2 into hashicorp:main Apr 26, 2022
@github-actions github-actions bot added this to the v4.12.0 milestone Apr 26, 2022
@github-actions
Copy link

This functionality has been released in v4.12.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. provider Pertains to the provider itself, rather than any interaction with AWS. service/rds Issues and PRs that pertain to the rds service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Aurora Serverless v2
7 participants