diff --git a/collector/aws/resources/rds.go b/collector/aws/resources/rds.go index 73c09826..2542611a 100644 --- a/collector/aws/resources/rds.go +++ b/collector/aws/resources/rds.go @@ -195,8 +195,10 @@ func (r *RDSManager) getPricingFilterInput(instance *rds.DBInstance) pricing.Get switch *instance.Engine { case "postgres": databaseEngine = "PostgreSQL" - case "aurora": + case "aurora", "aurora-mysql": databaseEngine = "Aurora MySQL" + case "aurora-postgresql": + databaseEngine = "Aurora PostgreSQL" default: databaseEngine = *instance.Engine } diff --git a/collector/aws/resources/rds_test.go b/collector/aws/resources/rds_test.go index db66416b..79d6a71e 100644 --- a/collector/aws/resources/rds_test.go +++ b/collector/aws/resources/rds_test.go @@ -48,6 +48,14 @@ var defaultRDSMock = rds.DescribeDBInstancesOutput{ Engine: awsClient.String("docdb"), InstanceCreateTime: testutils.TimePointer(time.Now()), }, + { + DBInstanceArn: awsClient.String("ARN::5"), + DBInstanceIdentifier: awsClient.String("i-5"), + MultiAZ: testutils.BoolPointer(false), + DBInstanceClass: awsClient.String("t2.micro"), + Engine: awsClient.String("aurora-mysql"), + InstanceCreateTime: testutils.TimePointer(time.Now()), + }, }, } @@ -91,8 +99,8 @@ func TestDescribeRDSInstances(t *testing.T) { result, _ := rdsManager.describeInstances(nil, nil) - if len(result) != 3 { - t.Fatalf("unexpected rds instance count, got %d expected %d", len(result), 3) + if len(result) != 4 { + t.Fatalf("unexpected rds instance count, got %d expected %d", len(result), 4) } })