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_has_public_access.md. A documentation index is available at /llms.txt.
This product is not supported for your selected Datadog site. ().

Metadata

Id: fb387023-e4bb-42a8-9a70-6708aa7ff21b

Cloud Provider: Nifcloud

Platform: Terraform

Severity: High

Category: Networking and Firewall

Learn More

Description

The RDB instance is configured to allow public network access. This rule detects nifcloud_db_instance resources where publicly_accessible is set to true and reports an IncorrectValue issue; network access should be limited to the minimum required for the application to function. Report attributes: documentId, resourceType, resourceName, searchKey, issueType, keyExpectedValue, keyActualValue.

Compliant Code Examples

resource "nifcloud_db_instance" "negative" {
  identifier          = "example"
  instance_class      = "db.large8"
  publicly_accessible = false
}

Non-Compliant Code Examples

resource "nifcloud_db_instance" "positive" {
  identifier          = "example"
  instance_class      = "db.large8"
  publicly_accessible = true
}