File tree 18 files changed +74
-5
lines changed
travis-ci-prod-services-1
18 files changed +74
-5
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ provider "aws" {}
65
65
provider "heroku" {}
66
66
67
67
module "gce_net" {
68
- source = " ../modules/gce_net "
68
+ source = " ../modules/gce_net_workers "
69
69
70
70
bastion_config = " ${ file (" config/bastion.env" )} "
71
71
bastion_image = " ${ var . gce_bastion_image } "
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ provider "aws" {}
65
65
provider "heroku" {}
66
66
67
67
module "gce_net" {
68
- source = " ../modules/gce_net "
68
+ source = " ../modules/gce_net_workers "
69
69
70
70
bastion_config = " ${ file (" config/bastion.env" )} "
71
71
bastion_image = " ${ var . gce_bastion_image } "
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ provider "aws" {}
65
65
provider "heroku" {}
66
66
67
67
module "gce_net" {
68
- source = " ../modules/gce_net "
68
+ source = " ../modules/gce_net_workers "
69
69
70
70
bastion_config = " ${ file (" config/bastion.env" )} "
71
71
bastion_image = " ${ var . gce_bastion_image } "
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ provider "aws" {}
66
66
provider "heroku" {}
67
67
68
68
module "gce_net" {
69
- source = " ../modules/gce_net "
69
+ source = " ../modules/gce_net_workers "
70
70
71
71
bastion_config = " ${ file (" config/bastion.env" )} "
72
72
bastion_image = " ${ var . latest_gce_bastion_image } "
Original file line number Diff line number Diff line change
1
+ resource "google_compute_address" "services_nat" {
2
+ count = " ${ var . nat_ip_count } "
3
+ name = " services-nat-ip-${ count . index } "
4
+ project = " ${ var . project } "
5
+ }
6
+
7
+ resource "google_compute_router" "services_nat" {
8
+ name = " router"
9
+ project = " ${ var . project } "
10
+ network = " ${ google_compute_network . main . self_link } "
11
+
12
+ bgp {
13
+ asn = 64514
14
+ }
15
+ }
16
+
17
+ resource "google_compute_router_nat" "services_nat" {
18
+ name = " services-nat"
19
+ project = " ${ var . project } "
20
+
21
+ nat_ip_allocate_option = " MANUAL_ONLY"
22
+ nat_ips = [" ${ google_compute_address . services_nat . * . self_link } " ]
23
+ router = " ${ google_compute_router . services_nat . name } "
24
+ source_subnetwork_ip_ranges_to_nat = " LIST_OF_SUBNETWORKS"
25
+
26
+ subnetwork {
27
+ name = " ${ google_compute_subnetwork . services . self_link } "
28
+ source_ip_ranges_to_nat = [" ALL_IP_RANGES" ]
29
+ }
30
+
31
+ log_config {
32
+ enable = false
33
+ }
34
+ }
Original file line number Diff line number Diff line change
1
+ resource "google_compute_network" "main" {
2
+ name = " main"
3
+ project = " ${ var . project } "
4
+ auto_create_subnetworks = " false"
5
+ }
6
+
7
+ resource "google_compute_subnetwork" "services" {
8
+ name = " services"
9
+ project = " ${ var . project } "
10
+ ip_cidr_range = " ${ var . services_subnet_cidr_range } "
11
+ network = " ${ google_compute_network . main . self_link } "
12
+ enable_flow_logs = " true"
13
+ }
14
+
15
+ output "main_network_name" {
16
+ value = " ${ google_compute_network . main . name } "
17
+ }
18
+
19
+ output "services_network_name" {
20
+ value = " ${ google_compute_subnetwork . services . name } "
21
+ }
Original file line number Diff line number Diff line change
1
+ variable "project" {}
2
+
3
+ variable "nat_ip_count" {
4
+ default = 1
5
+ }
6
+
7
+ variable "services_subnet_cidr_range" {
8
+ default = " 10.80.0.0/16"
9
+ }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ module "project" {
5
5
project_id = " ${ var . project_id } "
6
6
}
7
7
8
- # module "networking" {}
8
+ module "networking" {
9
+ source = " ../modules/gce_net_services"
10
+
11
+ project = " ${ module . project . project_id } "
12
+ }
13
+
9
14
# module "kubernetes_cluster" {}
10
15
You can’t perform that action at this time.
0 commit comments