File tree 4 files changed +9
-1
lines changed 4 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ module proxy {
37
37
| Name | Description | Type | Default | Required |
38
38
| ------| -------------| :----:| :-----:| :-----:|
39
39
| ami | The EC2 image ID to launch. | string | ` "" ` | no |
40
+ | connection\_ timeout | Database connection timeout. | number | ` "10" ` | no |
40
41
| cpu\_ credits | The credit option for CPU usage \( unlimited or standard\) | string | ` "standart" ` | no |
41
42
| docker\_ compose\_ version | Version of docker-compose to install. | string | ` "1.25.0" ` | no |
42
43
| expiredate | In hours when access should expire. | string | ` "100h" ` | no |
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ data template_cloudinit_config express {
21
21
nginx_content = base64gzip (templatefile (" ${ path . module } /templates/nginx.conf" , {
22
22
sql_server_fqdn = var.sql_server_fqdn
23
23
sql_server_port = var.sql_server_port
24
+ timeout = var.connection_timout
24
25
}))
25
26
html_content = base64gzip (templatefile (" ${ path . module } /templates/index.html" , {
26
27
name = var.name
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ stream {
14
14
server {
15
15
listen ${sql_server_port};
16
16
proxy_pass sqlvm;
17
- proxy_connect_timeout 1s ;
17
+ proxy_connect_timeout ${timeout}s ;
18
18
}
19
19
}
20
20
http {
Original file line number Diff line number Diff line change @@ -86,4 +86,10 @@ variable "sql_server_port" {
86
86
type = number
87
87
description = " User name with home dictory."
88
88
default = 1433
89
+ }
90
+
91
+ variable "connection_timeout" {
92
+ type = number
93
+ description = " Database connection timeout."
94
+ default = 10
89
95
}
You can’t perform that action at this time.
0 commit comments