-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Password Validation Policy in cloud sql instance. (#6…
…329) (#126) Co-authored-by: Shuya Ma <[email protected]> Signed-off-by: Modular Magician <[email protected]> Signed-off-by: Modular Magician <[email protected]> Co-authored-by: Shuya Ma <[email protected]>
- Loading branch information
1 parent
23988bd
commit 6ff2d2e
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# [START cloud_sql_mysql_instance_pvp] | ||
resource "google_sql_database_instance" "mysql_pvp_instance_name" { | ||
name = "mysql-pvp-instance-name" | ||
region = "asia-northeast1" | ||
database_version = "MYSQL_8_0" | ||
root_password = "abcABC123!" | ||
settings { | ||
tier = "db-f1-micro" | ||
password_validation_policy { | ||
min_length = 6 | ||
complexity = "COMPLEXITY_DEFAULT" | ||
reuse_interval = 2 | ||
disallow_username_substring = true | ||
enable_password_policy = true | ||
} | ||
} | ||
deletion_protection = "true" | ||
} | ||
# [END cloud_sql_mysql_instance_pvp] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# [START cloud_sql_postgres_instance_pvp] | ||
resource "google_sql_database_instance" "postgres_pvp_instance_name" { | ||
name = "postgres-pvp-instance-name" | ||
region = "asia-northeast1" | ||
database_version = "POSTGRES_14" | ||
root_password = "abcABC123!" | ||
settings { | ||
tier = "db-custom-2-7680" | ||
password_validation_policy { | ||
min_length = 6 | ||
reuse_interval = 2 | ||
complexity = "COMPLEXITY_DEFAULT" | ||
disallow_username_substring = true | ||
password_change_interval = "30s" | ||
enable_password_policy = true | ||
} | ||
} | ||
deletion_protection = "true" | ||
} | ||
# [END cloud_sql_postgres_instance_pvp] |