diff --git a/go.mod b/go.mod
index fe6065a6..757d7eed 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/nais/cli
-go 1.26.5
+go 1.26.6
tool (
github.com/Khan/genqlient
diff --git a/internal/postgres/audit.go b/internal/postgres/audit.go
index d6b30462..6495e10f 100644
--- a/internal/postgres/audit.go
+++ b/internal/postgres/audit.go
@@ -134,6 +134,7 @@ func validateAuditFlags(ctx context.Context, info *CloudSQLDBInfo) error {
"cloudsql.enable_pgaudit",
"pgaudit.log",
"pgaudit.log_parameter",
+ "pgaudit.log_relation",
}
err = validateRequiredFlags(dbFlags, requiredFlags)
@@ -255,6 +256,17 @@ func verifyAuditAsAppUser(ctx context.Context, appName, team, environment string
}
out.Printf(" ✅ Flag pgaudit.log_parameter = %s\n", logParameter)
+ logRelation, relationExists := dbFlags["pgaudit.log_relation"]
+ if !relationExists {
+ out.Println(" ❌ Flag pgaudit.log_relation is missing")
+ return false, fmt.Errorf("pgaudit.log_relation flag is not set")
+ }
+ if logRelation != "on" && logRelation != "true" {
+ out.Printf(" ❌ Flag pgaudit.log_relation: expected on, got %s\n", logRelation)
+ return false, fmt.Errorf("pgaudit.log_relation must be set to 'on'")
+ }
+ out.Printf(" ✅ Flag pgaudit.log_relation = %s\n", logRelation)
+
db, err := sql.Open("cloudsqlpostgres", connectionInfo.ProxyConnectionString())
if err != nil {
return false, fmt.Errorf("error connecting to database: %w", err)
diff --git a/mise/config.toml b/mise/config.toml
index 6c2a77fa..ca87e885 100644
--- a/mise/config.toml
+++ b/mise/config.toml
@@ -1,6 +1,6 @@
[tools]
git-cliff = "2.10.1"
-go = "1.26.5"
+go = "1.26.6"
golangci-lint = "2.12.2"
yamlfmt = "0.17.2"