You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check: CKV_GCP_109: "Ensure the GCP PostgreSQL database log levels are set to ERROR or lower"
FAILED for resource: google_sql_database_instance. cloud_sql
File: /cloud_sql.tf:1-74
Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/google-cloud-policies/logging-policies-1/bc-google-cloud-109
Code lines for this resource are too many. Please use IDE of your choice to review the file.
Check: CKV_GCP_55: "Ensure PostgreSQL database 'log_min_messages' flag is set to a valid value"
FAILED for resource: google_sql_database_instance. cloud_sql
File: /cloud_sql.tf:1-74
Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/google-cloud-policies/cloud-sql-policies/bc-gcp-sql-6
My code was changed accordingly with the advice
I tried both ERROR and DEBUG5 with no success.
resource "google_sql_database_instance" "cloud_sql" {
name = "cloud-sql"
database_version = "POSTGRES_15"
region = var.region
project = var.project_id
settings {
tier = "db-f1-micro"
backup_configuration {
enabled = true
}
ip_configuration {
ipv4_enabled = false
require_ssl = false
private_network = "projects/${var.project_id}/global/networks/${var.network}"
}
database_flags {
name = "log_statement"
value = "all"
}
database_flags {
name = "log_lock_waits"
value = "on"
}
database_flags {
name = "log_connections"
value = "on"
}
database_flags {
name = "log_checkpoints"
value = "on"
}
database_flags {
name = "log_disconnections"
value = "on"
}
database_flags {
name = "log_hostname"
value = "on"
}
database_flags {
name = "log_min_error_statement"
value = "ERROR"
}
database_flags {
name = "log_min_messages"
value = "ERROR"
}
# database_flags {
# name = "log_min_messages"
# value = "DEBUG5"
# }
# database_flags {
# name = "enable_pgaudit"
# value = "on"
# }
database_flags {
name = "pgaudit.log"
value = "'all'"
}
database_flags {
name = "log_duration"
value = "on"
}
}
deletion_protection = false
depends_on = [google_service_networking_connection.private_vpc_connection]
}
Version:
Checkov 3.2.25
Additional context
I am running checkov from the Azure DevOps pipeline on Ubuntu 20.04.
Most of the checks behave normally.
marcin-kulik
changed the title
CKV_GCP_109, CKV_GCP_55 tests still fail after recomended changes (Terraform and GCP)
CKV_GCP_109, CKV_GCP_55 tests still fail after recomended changes for PostrgeSQL's database_flag for log levels (Terraform and GCP)
Feb 29, 2024
Tests still fail after recommended changes
My terraform code fails on the above 2 tests:
My code was changed accordingly with the advice
I tried both
ERROR
andDEBUG5
with no success.Version:
Checkov 3.2.25
Additional context
I am running checkov from the Azure DevOps pipeline on Ubuntu 20.04.
Most of the checks behave normally.
Here are Azure DevOps tasks:
Here is my bash script to run checkov:
The text was updated successfully, but these errors were encountered: