Skip to content

Commit 8c75b4e

Browse files
committed
allow custom protocol
1 parent 05ea392 commit 8c75b4e

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ resource "google_compute_instance" "openvpn_server" {
7777
%{endif~}
7878
export PORT_CHOICE=2
7979
export PORT=${var.server_port}
80+
export PROTOCOL_CHOICE=${var.protocol == "udp" ? 1 : 2}
8081
/home/${var.remote_user}/openvpn-install.sh
8182
SCRIPT
8283

scripts/refetch_user.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ if [[ "$REFETCH_USER_OVPN" = "true" ]];then
44
-o StrictHostKeyChecking=no \
55
-o UserKnownHostsFile=/dev/null \
66
$REMOTE_USER@$IP_ADDRESS:/home/$REMOTE_USER/*.ovpn .
7+
echo "Fetched user configs at $(realpath .)"
78
else
89
echo "Not fetching ovpn. All files upto date"
910
fi

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,9 @@ variable "dns_servers" {
103103
variable "server_port" {
104104
default = 1194
105105
type = number
106+
}
107+
108+
variable "protocol" {
109+
default = "udp"
110+
type = string
106111
}

0 commit comments

Comments
 (0)