NIFCLOUD RDB uses the common private network

Restrict database networking to the required clients.

Description

An RDB instance using net-COMMON_PRIVATE connects to the shared private network. For an isolated database, choose a dedicated Private LAN in the database’s zone.

Potential impact

Broad DB security group rules let other systems on the shared network attempt database connections.

Remediation

Set network_id to the destination LAN ID and allow only the required clients in the DB security group. Check the application’s route and connection address before switching, then test a database connection from the application.

Examples

The excerpts change the network on the same DB instance. Supply the LAN, engine and credentials for your deployment.

Before

hcl
resource "nifcloud_db_instance" "example" {
  identifier     = "example"
  instance_class = "db.large8"
  network_id     = "net-COMMON_PRIVATE"
}

After

hcl
resource "nifcloud_db_instance" "example" {
  identifier     = "example"
  instance_class = "db.large8"
  network_id     = nifcloud_private_lan.main.id
}

References