Database resources should not publicly available.
You should limit all access to the minimum that is required for your application to function.
It is recommended to specify the publicly_accessible
attribute parameter as false
.
resource "aws_db_instance" "my-resource" {
publicly_accessible = true
}
resource "aws_db_instance" "my-resource" {
publicly_accessible = false
}