For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/terraform/nifcloud/db_instance_has_common_private.md. A documentation index is available at /llms.txt.
This product is not supported for your selected Datadog site. ().

Metadata

Id: 9bf57c23-fbab-4222-85f3-3f207a53c6a8

Cloud Provider: Nifcloud

Platform: Terraform

Severity: Low

Category: Networking and Firewall

Learn More

Description

nifcloud_db_instance is configured to use the common private LAN net-COMMON_PRIVATE. The resource’s network_id should be a private LAN that isolates the private-side network from the shared network. This rule identifies nifcloud_db_instance resources that are using the common private network.

Compliant Code Examples

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

Non-Compliant Code Examples

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