Skip to content

Commit 3d5d36d

Browse files
committed
remove user host from the postgresql module
Since the argument has not been provided for PostgreSQL, this commit removes it from the postgresql module.
1 parent 00979f1 commit 3d5d36d

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

modules/postgresql/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
| read_replica_zones | The zones for the read replica instancess, it should be something like: `a,b,c`. Given zones are used rotationally for creating read replicas. | string | `` | no |
4848
| region | The region of the Cloud SQL resources | string | `us-central1` | no |
4949
| tier | The tier for the master instance. | string | `db-f1-micro` | no |
50-
| user_host | The host for the default user | string | `%` | no |
5150
| user_labels | The key/value labels for the master instances. | map | `<map>` | no |
5251
| user_name | The name of the default user | string | `default` | no |
5352
| user_password | The password for the default user. If not set, a random one will be generated and available in the generated_user_password output variable. | string | `` | no |

modules/postgresql/main.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616

1717
locals {
18-
default_user_host = ""
1918
ip_configuration_enabled = "${length(keys(var.ip_configuration)) > 0 ? true : false}"
2019

2120
ip_configurations = {
@@ -93,7 +92,6 @@ resource "google_sql_user" "default" {
9392
name = "${var.user_name}"
9493
project = "${var.project_id}"
9594
instance = "${google_sql_database_instance.default.name}"
96-
host = "${var.user_host}"
9795
password = "${var.user_password == "" ? random_id.user-password.hex : var.user_password}"
9896
depends_on = ["google_sql_database_instance.default"]
9997
}
@@ -103,7 +101,6 @@ resource "google_sql_user" "additional_users" {
103101
project = "${var.project_id}"
104102
name = "${lookup(var.additional_users[count.index], "name")}"
105103
password = "${lookup(var.additional_users[count.index], "password", random_id.user-password.hex)}"
106-
host = "${lookup(var.additional_users[count.index], "host", var.user_host)}"
107104
instance = "${google_sql_database_instance.default.name}"
108105
depends_on = ["google_sql_database_instance.default"]
109106
}

modules/postgresql/variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,6 @@ variable "user_name" {
233233
default = "default"
234234
}
235235

236-
variable "user_host" {
237-
description = "The host for the default user"
238-
default = "%"
239-
}
240-
241236
variable "user_password" {
242237
description = "The password for the default user. If not set, a random one will be generated and available in the generated_user_password output variable."
243238
default = ""

0 commit comments

Comments
 (0)