sidpalas / devops-directive-terraform-course

Companion repo for complete Terraform course
1.04k stars 1.67k forks source link

03-basics: Error creating the database instance #8

Open carlos-salinas opened 2 years ago

carlos-salinas commented 2 years ago

Executing terraform apply in the web-app folder the database instance provisioning fails:

aws_db_instance.db_instance: Creating...
╷
│ Error: Error creating DB Instance: InvalidParameterCombination: Cannot find version 9.5 for postgres
│       status code: 400, request id: 9085a882-f29c-4d65-a328-597a9ffa17ba
│ 
│   with aws_db_instance.db_instance,
│   on main.tf line 200, in resource "aws_db_instance" "db_instance":
│  200: resource "aws_db_instance" "db_instance" {
│ 
sidpalas commented 2 years ago

Do you have a requirement to use 9.5? I don't think RDS supports it anymore.

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.DBVersions

carlos-salinas commented 2 years ago

Correct! I modified manually the previous snippet trying to put back 12.5 and incorrectly I set 9.5 because I tried with several versions and none of then worked. Moreover, I checked the version drop-down at AWS Console and seems 12.5 is not available anymore.

DmitriKonnovNN commented 2 years ago

Unfortunately, available DB-versions varies in RDS-service from region to region. This confuses.