outerbounds / terraform-aws-metaflow

Deploy production-grade Metaflow cloud infrastructure on AWS
https://registry.terraform.io/modules/outerbounds/metaflow/aws/latest
Apache License 2.0
58 stars 49 forks source link

PostgreSQL 11 is EOL and out of standard support for RDS causing additional cost #96

Open hexa00 opened 2 months ago

hexa00 commented 2 months ago

The PostgreSQL version used in the datastore module is currently 11 as seen in : https://github.com/outerbounds/terraform-aws-metaflow/blob/ee7093cdbd4f6ac2df4e38b4db2f770a9c0fe607/modules/datastore/variables.tf#L14

However this version is now at EOL and costs extra to be supported by AWS (0.10$/h/VCPU) see:

https://docs.aws.amazon.com/AmazonRDS/latest/PostgreSQLReleaseNotes/postgresql-release-calendar.html https://aws.amazon.com/rds/postgresql/pricing/

Could this be upgraded ?

savingoyal commented 2 months ago

sure! would you like to submit a PR?

hexa00 commented 2 months ago

I could I'm just not sure what we'd need to watch out for for CI / testing of this... ?

If it's all automatic , I'm fine with a 1-3 liner for it that will change to the latest 11 (11.22) to 12.17 see: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html#USER_UpgradeDBInstance.PostgreSQL.MajorVersion

You can't just do 11 -> 12 .. needs to be 12.17 and we need to assume that people are on the latest minor for the upgrade to work without issue on aws's side (which is a resonable assumption I think given it upgrades minors automatically)

You also need to add allow_major_version_upgrade = true And potentially apply_immediately = true

Is that ok ?

hexa00 commented 2 months ago

Actually I'm going to keep allow_major & apply to false and add that as a var for the user

hexa00 commented 2 months ago

See: https://github.com/outerbounds/terraform-aws-metaflow/pull/97