terraform-provider-aws
terraform-provider-aws copied to clipboard
AWS GovCloud RDS Postgres Cluster (Non-Aurora) reports InvalidParameterCombination for supported versions
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform CLI and Terraform AWS Provider Version
Terraform v1.2.8
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v4.30.0
...
Affected Resource(s)
- aws_rds_cluster
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
data "aws_rds_engine_version" "this" {
engine = "postgres"
preferred_versions = ["13.6"]
}
resource "aws_rds_cluster" "this" {
...
engine = data.aws_rds_engine_version.this.engine
engine_version = data.aws_rds_engine_version.this.version
...
}
Expected Behavior
I expect to be able to create an RDS cluster with Postgres (non-Aurora) version 13.6 without an error.
Actual Behavior
I receive the following error:
Error: error creating RDS cluster: InvalidParameterCombination: The specified DB engine version isn't valid for the postgres DB cluster. Specify a valid DB engine version.
I'm provisioning this in an AWS GovCloud region, and I have confirmed that the AWS API reports this as being a valid engine version for RDS.
# aws rds describe-db-engine-versions --engine postgres --engine-version 13.6
{
"DBEngineVersions": [
{
"Engine": "postgres",
"EngineVersion": "13.6",
"DBParameterGroupFamily": "postgres13",
"DBEngineDescription": "PostgreSQL",
"DBEngineVersionDescription": "PostgreSQL 13.6-R1",
"ValidUpgradeTarget": [
{
"Engine": "postgres",
"EngineVersion": "13.7",
"Description": "PostgreSQL 13.7-R1",
"AutoUpgrade": false,
"IsMajorVersionUpgrade": false
},
{
"Engine": "postgres",
"EngineVersion": "14.2",
"Description": "PostgreSQL 14.2-R1",
"AutoUpgrade": false,
"IsMajorVersionUpgrade": true
},
{
"Engine": "postgres",
"EngineVersion": "14.3",
"Description": "PostgreSQL 14.3-R1",
"AutoUpgrade": false,
"IsMajorVersionUpgrade": true
},
{
"Engine": "postgres",
"EngineVersion": "14.4",
"Description": "PostgreSQL 14.4-R1",
"AutoUpgrade": false,
"IsMajorVersionUpgrade": true
}
],
...
Steps to Reproduce
- Setup a basic AWS RDS cluster configuration in GovCloud with
engine = "postgres"
andengine_version = "13.6"
-
terraform apply
Important Factoids
- I can provision a single RDS instance via the console with Postgres and version 13.6.
- I can provision an Aurora Postgres RDS cluster with version 13.6 by changing the engine to
aurora-postgresql
but this is not the desired infrastructure for my use case. - I have tried provisioning a different version of the Postgres engine (12.10) but received the same error.
This feels as if I'm missing something about AWS RDS, perhaps Postgres 13.6 isn't a valid option for an AWS RDS cluster. I haven't tried this in a non-GovCloud region yet. If it works in a non-GovCloud region then this feels like a bug in the AWS Terraform provider (perhaps there's some translation missing when talking to the GovCloud API versus the commercial AWS API?).
same questions
no idea
I think I solved it.
It's a bad error message from AWS or the provider, IDK
The solution for me was to use a supported DB instance size. db.t3.medium
won't work but db.m5d.large
works fine.
Bizarre. I only caught it because I tried to create a multi-az postgres cluster(not aurora) via the console and noticed the instance size options DO NOT include t3.
I assume this is due to the extra horsepower needed to handle replication.
Hope this helps!