Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
G
gitlab-com-infrastructure
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
13
Merge Requests
13
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
gitlab-com
gitlab-com-infrastructure
Commits
947552d7
Commit
947552d7
authored
May 23, 2019
by
Craig Barrett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Peer both gitlab-analysis VPCs to gstg and gprd
parent
e685d882
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
12 deletions
+62
-12
environments/gprd/external-access.tf
environments/gprd/external-access.tf
+31
-6
environments/gstg/external-access.tf
environments/gstg/external-access.tf
+31
-6
No files found.
environments/gprd/external-access.tf
View file @
947552d7
...
...
@@ -46,19 +46,44 @@ data "google_iam_policy" "dr-sa-access" {
#
#################################
resource
"google_compute_network_peering"
"peering-gitlab-analysis"
{
name
=
"peering-gitlab-analysis"
resource
"google_compute_network_peering"
"peering-gitlab-analysis
-default
"
{
name
=
"peering-gitlab-analysis
-default
"
network
=
"
${
var
.
network_env
}
"
peer_network
=
"https://www.googleapis.com/compute/v1/projects/gitlab-analysis/global/networks/default"
}
resource
"google_compute_firewall"
"allow-postgres-gitlab-analysis"
{
name
=
"allow-postgres-gitlab-analysis"
description
=
"allow gitlab-analysis default network to access gprd network"
resource
"google_compute_network_peering"
"peering-gitlab-analysis-gitlab-analysis-vpc"
{
name
=
"peering-gitlab-analysis-gitlab-analysis-vpc"
network
=
"
${
var
.
network_env
}
"
peer_network
=
"https://www.googleapis.com/compute/v1/projects/gitlab-analysis/global/networks/gitlab-analysis-vpc"
}
resource
"google_compute_firewall"
"allow-postgres-gitlab-analysis-default"
{
name
=
"allow-postgres-gitlab-analysis-default"
description
=
"allow gitlab-analysis network default to access gprd network"
network
=
"
${
var
.
network_env
}
"
source_ranges
=
[
"10.52.0.0/14"
,
# only from us-west1 default subnet
]
target_tags
=
[
"postgres-dr-archive"
,
]
allow
{
protocol
=
"tcp"
ports
=
[
"5432"
]
}
}
resource
"google_compute_firewall"
"allow-postgres-gitlab-analysis-gitlab-analysis-vpc"
{
name
=
"allow-postgres-gitlab-analysis-gitlab-analysis-vpc"
description
=
"allow gitlab-analysis network gitlab-analysis-vpc to access gprd network"
network
=
"
${
var
.
network_env
}
"
source_ranges
=
[
"10.1
38.0.0/20
"
,
# only from us-west1 default subnet
"10.1
60.0.0/14
"
,
# only from us-west1 default subnet
]
target_tags
=
[
...
...
environments/gstg/external-access.tf
View file @
947552d7
...
...
@@ -4,19 +4,44 @@
#
#################################
resource
"google_compute_network_peering"
"peering-gitlab-analysis"
{
name
=
"peering-gitlab-analysis"
resource
"google_compute_network_peering"
"peering-gitlab-analysis
-default
"
{
name
=
"peering-gitlab-analysis
-default
"
network
=
"
${
var
.
network_env
}
"
peer_network
=
"https://www.googleapis.com/compute/v1/projects/gitlab-analysis/global/networks/default"
}
resource
"google_compute_firewall"
"allow-postgres-gitlab-analysis"
{
name
=
"allow-postgres-gitlab-analysis"
description
=
"allow gitlab-analysis default network to access gstg network"
resource
"google_compute_network_peering"
"peering-gitlab-analysis-gitlab-analysis-vpc"
{
name
=
"peering-gitlab-analysis-gitlab-analysis-vpc"
network
=
"
${
var
.
network_env
}
"
peer_network
=
"https://www.googleapis.com/compute/v1/projects/gitlab-analysis/global/networks/gitlab-analysis-vpc"
}
resource
"google_compute_firewall"
"allow-postgres-gitlab-analysis-default"
{
name
=
"allow-postgres-gitlab-analysis-default"
description
=
"allow gitlab-analysis network default to access gstg network"
network
=
"
${
var
.
network_env
}
"
source_ranges
=
[
"10.52.0.0/14"
,
# only from us-west-1 default subnet
]
target_tags
=
[
"postgres-dr-archive"
,
]
allow
{
protocol
=
"tcp"
ports
=
[
"5432"
]
}
}
resource
"google_compute_firewall"
"allow-postgres-gitlab-analysis-gitlab-analysis-vpc"
{
name
=
"allow-postgres-gitlab-analysis-gitlab-analysis-vpc"
description
=
"allow gitlab-analysis network gitlab-analysis-vpc to access gstg network"
network
=
"
${
var
.
network_env
}
"
source_ranges
=
[
"10.1
38.0.0/20
"
,
# only from us-west-1 default subnet
"10.1
60.0.0/14
"
,
# only from us-west-1 default subnet
]
target_tags
=
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment