Upgrade AWS Aurora PostgreSQL to 17

Proprietary

Upgrade engine_version from Aurora PostgreSQL 11 to 16 to 17 on aws_rds_cluster resources with engine = "aurora-postgresql" and set allow_major_version_upgrade = true to permit the major version change.

org.openrewrite.terraform.aws.UpgradeAwsAuroraPostgresToV17
mod run . --recipe=org.openrewrite.terraform.aws.UpgradeAwsAuroraPostgresToV17

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Add content allow_major_version_upgrade = true to $.resource.aws_rds_cluster[?(@.engine == 'aurora-postgresql' && @.engine_version =~ '1[1-6](\..*)?')]
  2. Change value $.resource.aws_rds_cluster[?(@.engine == 'aurora-postgresql' && @.engine_version =~ '1[1-6](\..*)?')].allow_major_version_upgrade to true
  3. Change value $.resource.aws_rds_cluster[?(@.engine == 'aurora-postgresql' && @.engine_version =~ '1[1-6](\..*)?')].engine_version to "17"