Skip to content

Commit

Permalink
feat(gcp sql): add a password policy to cloud sql instances
Browse files Browse the repository at this point in the history
  • Loading branch information
tweakster committed Dec 2, 2024
1 parent d7934de commit a8a4c21
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/gcp_sql/instance.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,12 @@ resource "google_sql_database_instance" "this" {
# We want lower availability databases upgrading before higher...
update_track = var.high_availability ? "week5" : "stable" # Stable is week 2
}

password_validation_policy {
min_length = 15 # Per MoJ guidelines for admin level access
complexity = "COMPLEXITY_DEFAULT"
disallow_username_substring = true
enable_password_policy = true
}
}
}

0 comments on commit a8a4c21

Please sign in to comment.