Reputation: 34159
I am using terraform to create RDS instance
resource "aws_db_instance" "postgresql" {
allocated_storage = 10
engine = "postgres"
engine_version = "14.1"
instance_class = "db.t3.micro"
username = var.db_username
password = var.db_password
publicly_accessible = false
}
note that db_name
attribute is not included so this configuration will not create any database
Is there anyway to create empty database using terraform in existing RDS instance?
Upvotes: 1
Views: 2166
Reputation: 238957
Yes, you can use postgresql_database to create a database in your rds belonging to postgresql provider.
Upvotes: 1