Skip to content

Commit

Permalink
variables fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Spinelli committed Nov 10, 2023
1 parent 14da3e8 commit c27383d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/cloudsql-instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ locals {
password = try(v.type, "BUILT_IN") == "BUILT_IN" ? try(random_password.passwords[v.name].result, v.password) : null
type = try(v.type, "BUILT_IN")
} : {
name = local.is_postgres ? try(trimsuffix(v.name, ".gserviceaccount.com"), k) : k
name = local.is_postgres ? try(trimsuffix(k, ".gserviceaccount.com"), k) : k
host = null
password = try(v.type, "BUILT_IN") == "BUILT_IN" ? try(random_password.passwords[k].result, v.password) : null
type = try(v.type, "BUILT_IN")
Expand Down
6 changes: 3 additions & 3 deletions modules/cloudsql-instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ variable "tier" {
}

variable "users" {
description = "list of users to create in the primary instance (and replicated to other replicas). For MySQL, anything afterr the first `@` (if persent) will be used as the user's host. Set PASSWORD to null if you want to get an autogenerated password. The user types available are: 'BUILT_IN', 'CLOUD_IAM_USER' or 'CLOUD_IAM_SERVICE_ACCOUNT'."
type = list(object({
description = "Map of users to create in the primary instance (and replicated to other replicas). For MySQL, anything afterr the first `@` (if persent) will be used as the user's host. Set PASSWORD to null if you want to get an autogenerated password. The user types available are: 'BUILT_IN', 'CLOUD_IAM_USER' or 'CLOUD_IAM_SERVICE_ACCOUNT'."
type = map(object({
name = string
password = optional(string)
type = string
type = optional(string)
}))
default = null
}
Expand Down

0 comments on commit c27383d

Please sign in to comment.