Skip to content

Commit 0628b6d

Browse files
authored
Merge pull request #59 from GoogleCloudPlatform/q4-2024-release
feat: implementation of alloydb-psc, NCC and other patches
2 parents d0cdfaf + 43a3a49 commit 0628b6d

78 files changed

Lines changed: 3863 additions & 488 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
## Introduction
44

5-
This repository leverages pre-built Terraform templates to streamline the setup and management of Google Cloud's networking infrastructure. This project accelerates your access to managed services like AlloyDB, Cloud SQL and Memorystore for Redis Clusters while maintaining robust security boundaries between your on-premises resources and the cloud environment. By defining role-based stages, the solution ensures that only authorized users can modify specific network components, adhering to the principle of least privilege and enhancing overall security.
5+
This repository leverages pre-built Terraform templates to streamline the setup and management of Google Cloud's networking infrastructure. This project accelerates your access to managed services like AlloyDB, GKE, Vertex AI services, Cloud SQL and Memorystore for Redis Clusters while maintaining robust security boundaries between your on-premises resources and the cloud environment. By defining role-based stages, the solution ensures that only authorized users can modify specific network components, adhering to the principle of least privilege and enhancing overall security.
66

77
### Project Goals
8+
89
* Simplified setup
910
* Enhanced security
1011
* Scalability
@@ -20,6 +21,16 @@ The project is structured into the following folders:
2021
├── organization.tfvars
2122
├── networking.tfvars
2223
├── networking-manual.tfvars
24+
├── producer
25+
├── alloydb
26+
├── cloudsql
27+
├── gke
28+
├── vectorsearch
29+
├── vertex-ai-online-endpoints
30+
└── mrc
31+
├── consumer
32+
├── cloudrun
33+
└── gce
2334
└── security
2435
├── alloydb.tfvars
2536
├── cloudsql.tfvars
@@ -36,12 +47,14 @@ The project is structured into the following folders:
3647
└──modules
3748
├── net-vpc
3849
└── psc_forwarding_rule
50+
└── vector-search
51+
└── vertex-ai-online-endpoints
3952
```
4053
* `configuration`: This folder contains Terraform configuration files (*.tfvars) that hold variables used for multiple stages. These **.tfvars** files would include configurable variables such as project IDs, region or other values that you want to customize for your specific environment.
4154

4255
* `execution`: This folder houses the main Terraform code, organized into stages:
4356

44-
* `00-bootstrap`: Sets up foundational resources like service accounts and Terraform state storage.
57+
* `00-bootstrap`: Sets up foundational resources like service accounts and Terraform state storage.
4558
* `01-organization`: Manages organization-level policies for network resources.
4659
* `02-networking`: Manages VPCs, subnets, Cloud HA VPN and other core networking components like PSA, SCP, Cloud NAT.
4760
* `03-security`: Configures firewalls and other security measures.

configuration/bootstrap.tfvars

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
bootstrap_project_id = ""
2-
network_hostproject_id = ""
3-
network_serviceproject_id = "" // <service(producer/consumer)-project-id>
4-
organization_stage_administrator = ["user:user-example@example.com"]
5-
networking_stage_administrator = ["user:user-example@example.com"]
6-
security_stage_administrator = ["user:user-example@example.com"]
7-
producer_stage_administrator = ["user:user-example@example.com"]
8-
networking_manual_stage_administrator = ["user:user-example@example.com"]
9-
consumer_stage_administrator = ["user:user-example@example.com"]
1+
folder_id = ""
2+
bootstrap_project_id = ""
3+
network_hostproject_id = ""
4+
network_serviceproject_id = "" // <service(producer/consumer)-project-id>
5+
6+
organization_administrator = ["user:user-example@example.com"]
7+
networking_administrator = ["user:user-example@example.com"]
8+
security_administrator = ["user:user-example@example.com"]
9+
10+
producer_cloudsql_administrator = ["user:user-example@example.com"]
11+
producer_gke_administrator = ["user:user-example@example.com"]
12+
producer_alloydb_administrator = ["user:user-example@example.com"]
13+
producer_vertex_administrator = ["user:user-example@example.com"]
14+
producer_mrc_administrator = ["user:user-example@example.com"]
15+
16+
networking_manual_administrator = ["user:user-example@example.com"]
17+
18+
consumer_gce_administrator = ["user:user-example@example.com"]
19+
consumer_cloudrun_administrator = ["user:user-example@example.com"]

configuration/networking.tfvars

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ tunnel_2_shared_secret = ""
4242
## Cloud Interconnect input variables
4343

4444
create_interconnect = false # Use true or false
45+
46+
## NCC input variables
47+
48+
create_ncc = false
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cluster_id: <cluster-id-here>
2+
cluster_display_name: <cluster-display-name-here>
3+
project_id: <project-id>
4+
region: <region> #e.g. : us-central1
5+
network_id: <network-id> #e.g. : projects/<project-id>/global/networks/<network-name>
6+
primary_instance:
7+
instance_id : <instance-id-here>
8+
display_name : <instance-display-name-here>
9+
instance_type : PRIMARY
10+
machine_cpu_count : 2
11+
database_flags : null
12+
read_pool_instance : null
13+
automated_backup_policy : null
14+
connectivity_options: "PSC" # Use "PSA" for PSA connectivity
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cluster_id: <cluster-id-here>
2+
cluster_display_name: <cluster-display-name-here>
3+
project_id: <project-id>
4+
region: <region> #e.g. : us-central1
5+
primary_instance:
6+
instance_id : <instance-id-here>
7+
display_name : <instance-display-name-here>
8+
instance_type : PRIMARY
9+
machine_cpu_count : 2
10+
database_flags : null
11+
read_pool_instance : null
12+
automated_backup_policy : null
13+
connectivity_options: "PSC" # Use "PSA" for PSA connectivity
14+
psc_allowed_consumer_projects: ["<project-number>, <project-number>"] # Include the list of allowed consumer projects here
15+
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
cluster_id: <cluster-id-here>
22
cluster_display_name: <cluster-display-name-here>
33
project_id: <project-id>
4-
region: us-central1
4+
region: <region> #e.g. : us-central1
55
network_id: <network-id> #e.g. : projects/<project-id>/global/networks/<network-name>
6-
allocated_ip_range: range1
76
primary_instance:
87
instance_id : <instance-id-here>
98
display_name : <instance-display-name-here>
@@ -12,3 +11,5 @@ primary_instance:
1211
database_flags : null
1312
read_pool_instance : null
1413
automated_backup_policy : null
14+
connectivity_options: "psc" # Use "psa" for PSA connectivity
15+
psc_allowed_consumer_projects: ["<project-number>, <project-number>"] # Include the list of allowed consumer projects here

configuration/producer/GKE/config/instance.yaml.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ network : <cluster-vpc>
44
subnetwork : <cluster-vpc-subnetwork>
55
ip_range_pods : <cluster-range-for-pods>
66
ip_range_services : <cluster-range-for-services>
7-
kubernetes_version : <cluster-version> # e.g. : 1.27
7+
kubernetes_version : <cluster-version> # e.g. : 1.31.1-gke.2105000

docs/AlloyDB/alloydbinstance-using-psa-accessed-from-gce.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ To use this configuration solution, ensure the following are installed:
267267
2. Remove the resources that were provisioned by the solution guide:
268268
269269
```
270-
./run.sh -s all -t init-destroy-auto-approve
270+
./run.sh -s all -t destroy-auto-approve
271271
```
272272
273273
Terraform displays a list of the resources that will be destroyed.

0 commit comments

Comments
 (0)