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

Commit 6432a13

Browse files
committed
Revert "Namespace GCE using new lattice_namespace variable"
This reverts commit 095abdb. [#101697536]
1 parent eaf6259 commit 6432a13

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

terraform/google/example/lattice.google.tf

+8-11
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,22 @@ module "lattice-google" {
1010
# lattice_password = "<CHANGE-ME>"
1111

1212
# Path to the JSON file used to describe your account credentials, downloaded from Google Cloud Console
13-
# gce_account_file = "<CHANGE-ME>"
13+
gce_account_file = "<CHANGE-ME>"
1414

1515
# The name of the project to apply any resources to
16-
# gce_project = "<CHANGE-ME>"
16+
gce_project = "<CHANGE-ME>"
1717

1818
# SSH user
19-
# gce_ssh_user = "<CHANGE-ME>"
19+
gce_ssh_user = "<CHANGE-ME>"
2020

2121
# Path to the SSH private key file
22-
# gce_ssh_private_key_file = "<CHANGE-ME>"
22+
gce_ssh_private_key_file = "<CHANGE-ME>"
2323

24-
# The number of Lattice Cells to launch (optional, default: 1)
25-
# num_cells = "1"
24+
# The number of Lattice Cells to launch
25+
num_cells = "1"
2626

27-
# Google Compute Engine zone (optional, default: "us-central1-a")
28-
# gce_zone = "us-central1-a"
29-
30-
# Namespace (optional, default: "lattice")
31-
# lattice_namespace = "lattice"
27+
# Google Compute Engine zone (optional)
28+
# gce_zone = "<CHANGE-ME>"
3229
}
3330

3431
output "lattice_target" {

terraform/google/resources.tf

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
resource "google_compute_network" "lattice-network" {
2-
name = "${var.lattice_namespace}-network"
2+
name = "lattice"
33
ipv4_range = "${var.gce_ipv4_range}"
44
}
55

66
resource "google_compute_firewall" "lattice-network" {
7-
name = "${var.lattice_namespace}-firewall"
7+
name = "lattice"
88
network = "${google_compute_network.lattice-network.name}"
99
source_ranges = ["0.0.0.0/0"]
1010
allow {
@@ -19,12 +19,12 @@ resource "google_compute_firewall" "lattice-network" {
1919
}
2020

2121
resource "google_compute_address" "lattice-brain" {
22-
name = "${var.lattice_namespace}-brain"
22+
name = "lattice-brain"
2323
}
2424

2525
resource "google_compute_instance" "lattice-brain" {
2626
zone = "${var.gce_zone}"
27-
name = "${var.lattice_namespace}-brain"
27+
name = "lattice-brain"
2828
tags = ["lattice"]
2929
description = "Lattice Brain"
3030
machine_type = "${var.gce_machine_type_brain}"
@@ -91,7 +91,7 @@ resource "google_compute_instance" "lattice-brain" {
9191
resource "google_compute_instance" "cell" {
9292
count = "${var.num_cells}"
9393
zone = "${var.gce_zone}"
94-
name = "${var.lattice_namespace}-cell-${count.index}"
94+
name = "cell-${count.index}"
9595
tags = ["lattice"]
9696
description = "Lattice Cell ${count.index}"
9797
machine_type = "${var.gce_machine_type_cell}"
@@ -145,7 +145,7 @@ resource "google_compute_instance" "cell" {
145145
"sudo mkdir -p /var/lattice/setup/",
146146
"sudo sh -c 'echo \"CONSUL_SERVER_IP=${google_compute_address.lattice-brain.address}\" >> /var/lattice/setup/lattice-environment'",
147147
"sudo sh -c 'echo \"SYSTEM_DOMAIN=${google_compute_address.lattice-brain.address}.xip.io\" >> /var/lattice/setup/lattice-environment'",
148-
"sudo sh -c 'echo \"LATTICE_CELL_ID=${var.lattice_namespace}-cell-${count.index}\" >> /var/lattice/setup/lattice-environment'",
148+
"sudo sh -c 'echo \"LATTICE_CELL_ID=cell-${count.index}\" >> /var/lattice/setup/lattice-environment'",
149149
"sudo sh -c 'echo \"GARDEN_EXTERNAL_IP=$(hostname -I | awk '\"'\"'{ print $1 }'\"'\"')\" >> /var/lattice/setup/lattice-environment'",
150150

151151
"sudo chmod +x /tmp/install-from-tar",

terraform/google/variables.tf

-5
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,3 @@ variable "lattice_password" {
6060
variable "lattice_tar_source" {
6161
description = "URL or local path of the lattice tar used to deploy your cluster."
6262
}
63-
64-
variable "lattice_namespace" {
65-
description = "Unique prefix for lattice infrastructure components, for deploying multiple clusters with different prefixes."
66-
default = "lattice"
67-
}

0 commit comments

Comments
 (0)