From 67b3bd6db2cb2a7240b74ae312611e51e352c97c Mon Sep 17 00:00:00 2001 From: Pavan Navarathna Date: Fri, 13 Aug 2021 11:40:51 -0700 Subject: [PATCH] Change RDS DBInstance to supported version --- pkg/app/rds_postgres.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/app/rds_postgres.go b/pkg/app/rds_postgres.go index efc127ff15..1a03b46cf0 100644 --- a/pkg/app/rds_postgres.go +++ b/pkg/app/rds_postgres.go @@ -60,6 +60,10 @@ type RDSPostgresDB struct { sqlDB *sql.DB } +const ( + dbInstanceType = "db.t3.micro" +) + func NewRDSPostgresDB(name string, customRegion string) App { return &RDSPostgresDB{ name: name, @@ -146,7 +150,7 @@ func (pdb *RDSPostgresDB) Install(ctx context.Context, ns string) error { // Create RDS instance log.Info().Print("Creating RDS instance.", field.M{"app": pdb.name, "id": pdb.id}) - _, err = rdsCli.CreateDBInstance(ctx, 20, "db.t2.micro", pdb.id, "postgres", pdb.username, pdb.password, []string{pdb.securityGroupID}) + _, err = rdsCli.CreateDBInstance(ctx, 20, dbInstanceType, pdb.id, "postgres", pdb.username, pdb.password, []string{pdb.securityGroupID}) if err != nil { return err }