Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit 3ddb5e7

Browse files
committed
Remove all cell access restrictions in terraform deploy
- These will be re-enabled in a later release [Finishes #103224632]
1 parent 0488f80 commit 3ddb5e7

File tree

6 files changed

+9
-49
lines changed

6 files changed

+9
-49
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ This repository contains several [Terraform](https://www.terraform.io/) template
212212
v0.3.0 | Terraform 0.6.1
213213
v0.2.7 | Terraform 0.6.1
214214

215-
> As of v0.4.1, direct access to Lattice cells will be restricted to private addresses within the cluster.
216-
217215
## Deploying
218216

219217
Here are some step-by-step instructions for deploying a Lattice cluster via Terraform:

terraform/aws/resources.tf

+2-8
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,6 @@ resource "aws_instance" "cell" {
160160
destination = "/tmp/install-from-tar"
161161
}
162162

163-
provisioner "file" {
164-
source = "${path.module}/../scripts/remote/cell-iptables"
165-
destination = "/tmp/cell-iptables"
166-
}
167-
168163
provisioner "remote-exec" {
169164
inline = [
170165
"sudo mkdir -p /var/lattice/setup",
@@ -173,9 +168,8 @@ resource "aws_instance" "cell" {
173168
"sudo sh -c 'echo \"LATTICE_CELL_ID=cell-${count.index}\" >> /var/lattice/setup/lattice-environment'",
174169
"sudo sh -c 'echo \"GARDEN_EXTERNAL_IP=$(hostname -I | awk '\"'\"'{ print $1 }'\"'\"')\" >> /var/lattice/setup/lattice-environment'",
175170

176-
"sudo chmod +x /tmp/install-from-tar /tmp/cell-iptables",
177-
"sudo /tmp/install-from-tar cell",
178-
"sudo /tmp/cell-iptables ${aws_instance.lattice-brain.private_ip}",
171+
"sudo chmod +x /tmp/install-from-tar",
172+
"sudo /tmp/install-from-tar cell"
179173
]
180174
}
181175
}

terraform/digitalocean/resources.tf

+3-9
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ resource "digitalocean_droplet" "lattice-brain" {
4848
"sudo sh -c 'echo \"LATTICE_PASSWORD=${var.lattice_password}\" >> /var/lattice/setup/lattice-environment'",
4949
"sudo sh -c 'echo \"CONSUL_SERVER_IP=${digitalocean_droplet.lattice-brain.ipv4_address}\" >> /var/lattice/setup/lattice-environment'",
5050
"sudo sh -c 'echo \"SYSTEM_DOMAIN=${digitalocean_droplet.lattice-brain.ipv4_address}.xip.io\" >> /var/lattice/setup/lattice-environment'",
51-
51+
5252
"sudo apt-get -y install lighttpd lighttpd-mod-webdav",
5353
"sudo chmod 755 /tmp/install-from-tar",
5454
"sudo /tmp/install-from-tar brain",
@@ -85,11 +85,6 @@ resource "digitalocean_droplet" "cell" {
8585
destination = "/tmp/install-from-tar"
8686
}
8787

88-
provisioner "file" {
89-
source = "${path.module}/../scripts/remote/cell-iptables"
90-
destination = "/tmp/cell-iptables"
91-
}
92-
9388
provisioner "remote-exec" {
9489
inline = [
9590
"sudo apt-get update",
@@ -113,9 +108,8 @@ resource "digitalocean_droplet" "cell" {
113108
"sudo sh -c 'echo \"LATTICE_CELL_ID=cell-${count.index}\" >> /var/lattice/setup/lattice-environment'",
114109
"sudo sh -c 'echo \"GARDEN_EXTERNAL_IP=$(hostname -I | awk '\"'\"'{ print $1 }'\"'\"')\" >> /var/lattice/setup/lattice-environment'",
115110

116-
"sudo chmod +x /tmp/install-from-tar /tmp/cell-iptables",
117-
"sudo /tmp/install-from-tar cell",
118-
"sudo /tmp/cell-iptables ${digitalocean_droplet.lattice-brain.ipv4_address}",
111+
"sudo chmod +x /tmp/install-from-tar",
112+
"sudo /tmp/install-from-tar cell"
119113
]
120114
}
121115
}

terraform/google/resources.tf

+2-8
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,6 @@ resource "google_compute_instance" "cell" {
125125
destination = "/tmp/install-from-tar"
126126
}
127127

128-
provisioner "file" {
129-
source = "${path.module}/../scripts/remote/cell-iptables"
130-
destination = "/tmp/cell-iptables"
131-
}
132-
133128
provisioner "remote-exec" {
134129
inline = [
135130
"sudo apt-get update",
@@ -153,9 +148,8 @@ resource "google_compute_instance" "cell" {
153148
"sudo sh -c 'echo \"LATTICE_CELL_ID=cell-${count.index}\" >> /var/lattice/setup/lattice-environment'",
154149
"sudo sh -c 'echo \"GARDEN_EXTERNAL_IP=$(hostname -I | awk '\"'\"'{ print $1 }'\"'\"')\" >> /var/lattice/setup/lattice-environment'",
155150

156-
"sudo chmod +x /tmp/install-from-tar /tmp/cell-iptables",
157-
"sudo /tmp/install-from-tar cell",
158-
"sudo /tmp/cell-iptables ${google_compute_address.lattice-brain.address}",
151+
"sudo chmod +x /tmp/install-from-tar",
152+
"sudo /tmp/install-from-tar cell"
159153
]
160154
}
161155
}

terraform/openstack/resources.tf

+2-8
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,6 @@ resource "openstack_compute_instance_v2" "lattice-cell" {
178178
destination = "/tmp/install-from-tar"
179179
}
180180

181-
provisioner "file" {
182-
source = "${path.module}/../scripts/remote/cell-iptables"
183-
destination = "/tmp/cell-iptables"
184-
}
185-
186181
provisioner "remote-exec" {
187182
inline = [
188183
"sudo apt-get update",
@@ -200,9 +195,8 @@ resource "openstack_compute_instance_v2" "lattice-cell" {
200195
"sudo sh -c 'echo \"LATTICE_CELL_ID=lattice-cell-${count.index}\" >> /var/lattice/setup/lattice-environment'",
201196
"sudo sh -c 'echo \"GARDEN_EXTERNAL_IP=$(hostname -I | awk '\"'\"'{ print $1 }'\"'\"')\" >> /var/lattice/setup/lattice-environment'",
202197

203-
"sudo chmod +x /tmp/install-from-tar /tmp/cell-iptables",
204-
"sudo /tmp/install-from-tar cell",
205-
"sudo /tmp/cell-iptables ${openstack_compute_instance_v2.lattice-coordinator.access_ip_v4}",
198+
"sudo chmod +x /tmp/install-from-tar",
199+
"sudo /tmp/install-from-tar cell"
206200
]
207201
}
208202
}

terraform/scripts/remote/cell-iptables

-14
This file was deleted.

0 commit comments

Comments
 (0)