Description
Create a NIFCLOUD RDB instance with publicly_accessible = false when clients can use a private connection.
Potential impact
An external client can attempt a connection if routing and the DB security group allow it. Database credentials and permissions still control access to data.
Remediation
Changing this setting replaces the instance. For a live database, create a separate private instance with a different identifier. Migrate the data, reconcile final writes and test private access from applications and administrators before switching. If public connectivity is required, restrict the DB security group to approved sources.
Examples
The excerpts compare the two settings using the same example identifier. Supply the engine, credentials and private network path for your deployment.
Before
resource "nifcloud_db_instance" "app_db" {
identifier = "example"
instance_class = "db.large8"
publicly_accessible = true
}
After
resource "nifcloud_db_instance" "app_db" {
identifier = "example"
instance_class = "db.large8"
publicly_accessible = false
}