first sync
Some checks failed
terraform validation / Terraform (push) Failing after 20s

This commit is contained in:
2025-01-18 20:03:24 +01:00
parent 103287785f
commit 40e8e5e8cb
10 changed files with 106 additions and 0 deletions

17
user.tf Normal file
View File

@@ -0,0 +1,17 @@
locals {
database_access = {
database_host = google_sql_database_instance.this.ip_address[0].ip_address
username = google_sql_user.user.name
password = google_sql_user.user.password
}
}
resource "random_password" "user_password" {
length = 12
}
resource "google_sql_user" "user" {
instance = google_sql_database_instance.this.id
name = var.database_user_name
password = random_password.user_password.result
}