-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
150 lines (122 loc) · 4.46 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
variable "project" {
description = "The ID of the project where PgBouncer will be created."
type = string
}
variable "name" {
description = "The name of the PgBouncer instance."
type = string
}
variable "zone" {
description = "The zone where PgBouncer will be created."
type = string
}
/* PgBouncer Configuration -------------------------------------------------- */
variable "database_host" {
description = "The host address of the Cloud SQL instance to connect to."
type = string
}
variable "port" {
description = "The port used by PgBouncer to listen on."
type = number
}
variable "users" {
description = "The list of users to be created in PgBouncer's userlist.txt. Passwords can be provided as plain-text or md5 hashes."
type = list
}
variable "auth_user" {
description = "Any user not specified in `users` will be queried through the `auth_query` query from `pg_shadow` in the database, using `auth_user`. The user for `auth_user` must be included in `users`."
type = string
default = null
}
variable "auth_query" {
description = "Query to load user’s password from database."
type = string
default = null
}
variable "pool_mode" {
description = "Specifies when a server connection can be reused by other clients. Possible values are `session`, `transaction` or `statement`."
type = string
default = "transaction"
}
variable "default_pool_size" {
description = "Maximum number of server connections to allow per user/database pair."
type = number
default = 20
}
variable "max_client_connections" {
description = "Maximum number of client connections allowed."
type = number
default = 100
}
variable "max_db_connections" {
description = "The maximum number of server connections per database (regardless of user). 0 is unlimited."
type = number
default = 0
}
variable "pgbouncer_custom_config" {
description = "Custom PgBouncer configuration values to be appended to `pgbouncer.ini`."
type = string
default = ""
}
variable "pgbouncer_image_tag" {
description = "The tag to use for the base PgBouncer `edoburu/pgbouncer` Docker image used by this module."
default = "latest"
}
/* Instance Configuration --------------------------------------------------- */
variable "instance_count" {
description = "The number of instances of PgBouncer to create. Useful for HA setups."
type = number
default = 1
}
variable "subnetwork" {
description = "The name or self-link of the subnet where PgBouncer will be created. Either network or subnetwork must be provided."
type = string
default = null
}
variable "public_ip_address" {
description = "The public IP address to assign to the PgBouncer instance. If not given, one will be generated. Note: setting this value will limit the instance count to 1."
type = string
default = null
}
variable "machine_type" {
description = "The machine type of PgBouncer instances."
type = string
default = "f1-micro"
}
variable "boot_image" {
description = "The boot image used by PgBouncer instances. Defaults to the latest LTS Container Optimized OS version. Must be an image compatible with cloud-init (https://cloud-init.io)."
type = string
default = "cos-cloud/cos-81-lts"
}
variable "tags" {
description = "A list of tags to assign to PgBouncer instances."
type = list
default = []
}
variable "service_account_email" {
description = "The service account e-mail address. If not given, the default Google Compute Engine service account is used."
default = null
}
variable "service_account_scopes" {
description = "A list of service scopes to apply to the PgBouncer instance. Default is the full `cloud-platform` access scope."
default = null
}
variable "disable_public_ip" {
description = "Flag to disable the PgBouncer instance from being assigned an external, public IP"
default = false
}
variable "disable_service_account" {
description = "Flag to disable attaching a service account to the PgBouncer instance."
default = false
}
/* Misc --------------------------------------------------------------------- */
variable "module_depends_on" {
description = "List of modules or resources this module depends on."
type = list
default = []
}
variable "network_ip" {
description = "Private IP Address of the VM"
type = string
default = null
}