File tree Expand file tree Collapse file tree 6 files changed +25
-19
lines changed Expand file tree Collapse file tree 6 files changed +25
-19
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ provider "linode" {
2
+ token = var. linode_token
3
+ }
4
+
5
+ resource "random_string" "tunnel_label" {
6
+ length = 6
7
+ special = false
8
+ upper = false
9
+ min_lower = 3
10
+ min_numeric = 3
11
+ }
12
+
13
+ resource "linode_instance" "tunnel" {
14
+ region = var. region
15
+ type = " g6-nanode-1"
16
+ label = " tunnel-${ random_string . tunnel_label . result } "
17
+ image = " linode/ubuntu18.04"
18
+ authorized_keys = [" ${ chomp (file (var. ssh_key ))} " ]
19
+ }
20
+
1
21
resource "null_resource" "tunnel_connection" {
2
22
depends_on = [linode_instance . tunnel ]
3
23
provisioner "local-exec" {
File renamed without changes.
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ connect_loop () {
4
4
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q ${USER} @${HOST} " while true; do sleep 30; done" ; networksetup -setsocksfirewallproxy wi-fi 127.0.0.1 8888
5
5
}
6
6
7
+ if [ ! -f nohup.out ]; then touch nohup.out; fi
7
8
networksetup -setsocksfirewallproxy wi-fi 127.0.0.1 8888
8
9
export -f connect_loop
9
10
nohup USER=${USER} HOST=${HOST} connect_loop & > /dev/null &
Original file line number Diff line number Diff line change @@ -17,3 +17,7 @@ variable "set_osx_proxy" {
17
17
default = false
18
18
description = " Sets OS X SOCKS Proxy (all_proxy is set for other OS that use this variable to specify a proxy when you enable open_browser)"
19
19
}
20
+ variable "region" {
21
+ default = " us-central"
22
+ description = " Linode Region"
23
+ }
You can’t perform that action at this time.
0 commit comments