Hi
I have a TF that creates a Postgres DB in Amazon. This instance has a initial db
resource "aws_db_instance" "main" {
identifier = "${var.role}-${var.environment}"
instance_class = var.rds_type
allocated_storage = var.db_storage_size
multi_az = var.multi_az
storage_type = "gp2"
engine = "postgres"
engine_version = "12.6"
name = "mydb"
username = "username"
password = random_password.password.result
...
But I need to create a secondary Db inside the same instance. Do you know how to achieve that?
I found this example (for mysql) in the web where it says that this will do it
# Create a second database, in addition to the "initial_db" created
# by the aws_db_instance resource above.
resource "mysql_database" "app" {
name = "another_db"
}
is ther anything similar for Postgres?
Any help would be appreciated.
Thanks