We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 975fb1a commit e079ffaCopy full SHA for e079ffa
1 file changed
contrib/digitalocean/provision-do-cluster.sh
@@ -5,6 +5,13 @@
5
6
set -e
7
8
+listcontains() {
9
+ for i in $1; do
10
+ [[ $i = $2 ]] && echo $i && return 0
11
+ done
12
+ return 1
13
+}
14
+
15
THIS_DIR=$(cd $(dirname $0); pwd) # absolute path
16
CONTRIB_DIR=$(dirname $THIS_DIR)
17
@@ -25,6 +32,18 @@ if [ -z "$DEIS_NUM_INSTANCES" ]; then
25
32
DEIS_NUM_INSTANCES=3
26
33
fi
27
34
35
+regions_with_private_networking=(4 5 6 7)
36
+if ! listcontains "$regions_with_private_networking" "$2";
37
+then
38
+ echo_red "Invalid region. Please supply a region with private networking support."
39
+ echo_red "Valid regions are:"
40
+ echo_red "4: New York 2"
41
+ echo_red "5: Amsterdam 2"
42
+ echo_red "6: Singapore 1"
43
+ echo_red "7: London 1"
44
+ exit 1
45
+fi
46
28
47
# check that the CoreOS user-data file is valid
29
48
$CONTRIB_DIR/util/check-user-data.sh
30
49
0 commit comments