Ensure Routing Table associated with Web tier subnet have the default route (0.0.0.0/0) defined to allow connectivity
Description
This policy checks if a route table associated with a web tier subnet has a default route (0.0.0.0/0) defined to allow connectivity through a NAT gateway. The default route is essential for enabling internet access for instances in the subnet. Without it, instances may not be able to connect to the internet, potentially disrupting application functionality. It's crucial to ensure the default route is correctly configured to maintain connectivity.
Code Example
terraform
resource "ncloud_route" "example" {
destination_cidr_block = "0.0.0.0/0"
target_type = "NATGW"
}Remediation
Update the route table configuration to include the default route (0.0.0.0/0) with the target type set to NATGW.
Rule Details
| Field | Value |
|---|---|
| ID | IAC-1222 |
| Severity | MEDIUM |
| IaC Type | Terraform |
| Frameworks | ncloud_route |
| Checkov ID | CKV_NCP_20 |