1
1
resource "google_compute_network" "lattice-network" {
2
- name = " ${ var . lattice_namespace } -network "
2
+ name = " lattice "
3
3
ipv4_range = " ${ var . gce_ipv4_range } "
4
4
}
5
5
6
6
resource "google_compute_firewall" "lattice-network" {
7
- name = " ${ var . lattice_namespace } -firewall "
7
+ name = " lattice "
8
8
network = " ${ google_compute_network . lattice-network . name } "
9
9
source_ranges = [" 0.0.0.0/0" ]
10
10
allow {
@@ -19,12 +19,12 @@ resource "google_compute_firewall" "lattice-network" {
19
19
}
20
20
21
21
resource "google_compute_address" "lattice-brain" {
22
- name = " ${ var . lattice_namespace } -brain"
22
+ name = " lattice -brain"
23
23
}
24
24
25
25
resource "google_compute_instance" "lattice-brain" {
26
26
zone = " ${ var . gce_zone } "
27
- name = " ${ var . lattice_namespace } -brain"
27
+ name = " lattice -brain"
28
28
tags = [" lattice" ]
29
29
description = " Lattice Brain"
30
30
machine_type = " ${ var . gce_machine_type_brain } "
@@ -91,7 +91,7 @@ resource "google_compute_instance" "lattice-brain" {
91
91
resource "google_compute_instance" "cell" {
92
92
count = " ${ var . num_cells } "
93
93
zone = " ${ var . gce_zone } "
94
- name = " ${ var . lattice_namespace } - cell-${ count . index } "
94
+ name = " cell-${ count . index } "
95
95
tags = [" lattice" ]
96
96
description = " Lattice Cell ${ count . index } "
97
97
machine_type = " ${ var . gce_machine_type_cell } "
@@ -145,7 +145,7 @@ resource "google_compute_instance" "cell" {
145
145
" sudo mkdir -p /var/lattice/setup/" ,
146
146
" sudo sh -c 'echo \" CONSUL_SERVER_IP=${ google_compute_address . lattice-brain . address } \" >> /var/lattice/setup/lattice-environment'" ,
147
147
" 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'" ,
149
149
" sudo sh -c 'echo \" GARDEN_EXTERNAL_IP=$(hostname -I | awk '\" '\" '{ print $1 }'\" '\" ')\" >> /var/lattice/setup/lattice-environment'" ,
150
150
151
151
" sudo chmod +x /tmp/install-from-tar" ,
0 commit comments