You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51-60Lines changed: 51 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,7 @@
3
3
4
4
Streamline your Google Cloud SQL instance deployment and management with this comprehensive Terraform module repository. This repository simplifies Google Cloud networking configuration for Cloud SQL instances. It bundles Terraform modules to make it easier to create and manage Cloud SQL instances and all dependent resources, such as cloud networking resources, IAM policies and service accounts.
5
5
6
-
This repository contains easy-to-use Terraform modules that would help you set up all the prerequisites components required to consume Cloud SQL with private IP in a GCP project. The modules make it easy to manage Cloud SQL and all relevant GCP resources.
7
-
This solution will help different users like database administrators and application engineers who want to quickly configure Cloud SQL with cloud networking.
6
+
This repository contains easy-to-use Terraform modules that would help you set up all the prerequisites components required to consume Cloud SQL with private IP in a GCP project. The modules make it easy to manage Cloud SQL and all relevant GCP resources. This solution will help different users like database administrators and application engineers who want to quickly configure Cloud SQL with cloud networking.
8
7
9
8
Here are some specific benefits of using this repository:
10
9
@@ -31,9 +30,20 @@ Once the Terraform configuration has been applied, your Cloud SQL instance will
31
30
32
31
Many examples are included in the [examples](./examples/) folder which describes the complete end-to-end examples covering different scenarios along with its implementation guide and architecture design.
33
32
34
-
1.[Host Service Project Scenario](./examples/1.Host-Service-Project) : This solution guides user through the steps to establish a host and a service project, create a Cloud SQL instance and a VM instance in the service project, and connect the VM instance to the Cloud SQL instance using the VM's private IP address. The host project contains the VPC, subnets, and firewall rules.
33
+
1.[Host Service Project Scenario](./examples/1.Host-Service-Project) : This solution guides a user through the steps to establish a host and a service project, create a Cloud SQL instance and a VM instance in the service project, and connect the VM instance to the Cloud SQL instance using the VM's private IP address. The host project contains the VPC, subnets, and firewall rules.
35
34
36
-
2.[VPC across VPN Tunnel Scenario](./examples/2.VPC-Across-VPN) : This solution guides user to create a highly available (HA) VPN connection between a user project and a host project with a service project attached. The solution then establishes a Cloud SQL connection using the private IP address of Cloud SQL instance created in the service project and a VM instance created in the user project.
35
+
36
+
2. This section outlines two user journeys for Service Networking: using **HA-VPN** or **Dedicated Interconnect**.
37
+
38
+
2.1 [VPC across VPN Tunnel Scenario](./examples/2.VPC-Across-VPN) : This solution guides a user to create a highly available (HA) VPN connection between a user project and a host project with a service project attached. The solution then establishes a Cloud SQL connection using the private IP address of the Cloud SQL instance created in the service project and a VM instance created in the user project.
39
+
40
+
2.2. [Service Networking Across Interconnect](./examples/ServiceNetworkingAcrossInterconnect) : This solution helps the user to create a dedicated interconnect connection with redundancy & 99.9% availability between an on-premise environment and a GCP project. The solution establishes a Cloud SQL connection using the private IP address of a Cloud SQL instance created inside a GCP project and a VM instance present in the user on-premise environment.
41
+
42
+
3.[PSC across VPN Scenario](./examples/3.PSC) : This solution guides a user to create a PSC enabled Cloud SQL instance with a consumer and producer project setup having a compute VM instance created in the consumer project connecting to the Cloud SQL instance through PSC service endpoint. The consumer project contains the consumer VPC, service endpoint & firewall rules to connect to the SQL instance in the producer project.
43
+
44
+
4.[PSC across VPN Scenario](./examples/4.PSC-Across-VPN) : This solution guides a user to create a HA VPN connection between user and consumer project to connect to a PSC enabled Cloud SQL instance in a producer project from a compute VM instance through PSC service endpoint. The compute instance in the consumer project connects to the PSC service endpoint via the VPN connection. The PSC service endpoint connects to the Cloud SQL instance.
45
+
46
+
All [GA offerings](https://cloud.google.com/sql/docs/sqlserver/private-ip) for Cloud SQL (MySQL, PostgreSQL, MSSQL) are supported through our solutions.
37
47
38
48
## Variables
39
49
@@ -63,7 +73,7 @@ Each providers.tf file carries information like service account to be impersonat
63
73
64
74
Following are sample commands that can be used to update the existing provider.tf.template file to create an provider.tf file.
65
75
66
-
1. For example1 - Host-Service project scenario
76
+
- For example : 1.Host-Service-Project
67
77
68
78
```
69
79
export _TF_SERVICE_ACCOUNT="<ENTER THE SERVICE ACCOUNT HERE>"
**Note :** test-summary is used to provide summary of the test results. More details [here](https://pkg.go.dev/gocloud.dev/internal/testing/test-summary)
107
+
export _TF_SERVICE_ACCOUNT="<ENTER THE SERVICE ACCOUNT HERE>"
108
+
export _TF_BUCKET_NAME="<ENTER THE GCS BUCKET NAME HERE>"
109
+
export _TF_EXAMPLE3_PREFIX="<ENTER THE GCS PREFIX NAME HERE>"
- For example : ServiceNetworkingAcrossInterconnect
139
134
140
-
1. cd REPO_NAME
141
-
2. go mod init test
142
-
3. go mod tidy
143
-
4. **go test -v -json -timeout 60m ./... | ./test-summary**
135
+
```
136
+
export _TF_SERVICE_ACCOUNT="<ENTER THE SERVICE ACCOUNT HERE>"
137
+
export _TF_BUCKET_NAME="<ENTER THE GCS BUCKET NAME HERE>"
138
+
export _TF_EXAMPLE_SNAcrossIC_PREFIX="<ENTER THE GCS PREFIX NAME HERE>"
144
139
145
-
**Note :** test-summary is used to provide summary of the test results. More details [here](https://pkg.go.dev/gocloud.dev/internal/testing/test-summary)
Copy file name to clipboardExpand all lines: examples/1.Host-Service-Project/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ This example solution is a good starting point for anyone who needs to quickly a
20
20
21
21
## Pre-requisite
22
22
23
-
1. User should have terraform and gcloud installed in the machine from which they plan to execute this script. Here are the link that describes the [terraform installation](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) steps and [gcloud cli installation steps](https://cloud.google.com/sdk/docs/install) .
23
+
1. User should have terraform and gcloud installed in the machine from which they plan to execute this script. Here are the link that describes the [terraform installation](https://developer.hashicorp.com/terraform/tutorials/gcp-get-started/install-cli) steps and [gcloud cli installation steps](https://cloud.google.com/sdk/docs/install) .
24
24
2. User should have two GCP projects which will be used as part of this guide. First GCP project will act as a Host Project and the Second GCP Project will act as a Service Project.
25
25
3. User planning to run this script should have following permissions asssigned to them in the respective projects as described below. User can either use webconsole or gcloud cli to assign these permission to the user identity using which these scripts will be executed. User can follow either step `3.a.` or `3.b.` or `3.c.` to complete this step.
26
26
-**Host Project**
@@ -75,7 +75,7 @@ This command creates an execution plan, which lets you preview the changes that
75
75
76
76
## Examples
77
77
78
-
1. This example leverages the existing network and subnetwork. Network information like network_name, network_id and subnetword_id should be passed in the terraform.tfvars file. The terraform.tfvars should look like
78
+
1. This example leverages the existing network and subnetwork. Network information like network_name, network_id and subnetwork_id should be passed in the terraform.tfvars file. The terraform.tfvars should look like
Copy file name to clipboardExpand all lines: examples/2.VPC-Across-VPN/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Here is a brief overview of the things being created by the terraform solution :
31
31
32
32
## Pre-requisite
33
33
34
-
1. User should have terraform and gcloud installed in the machine from which they plan to execute this script. Here are the link that describes the [terraform installation](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) steps and [gcloud cli installation steps](https://cloud.google.com/sdk/docs/install) .
34
+
1. User should have terraform and gcloud installed in the machine from which they plan to execute this script. Here are the link that describes the [terraform installation](https://developer.hashicorp.com/terraform/tutorials/gcp-get-started/install-cli) steps and [gcloud cli installation steps](https://cloud.google.com/sdk/docs/install) .
35
35
2. User should have three GCP projects which will be used as part of this guide. First GCP project will act as a Host Project, the Second GCP Project will act as a Service Project and the Third GCP project will act as the user project.
36
36
3. User planning to run this script should have following permissions asssigned to them in the respective projects as described below. User can either use webconsole or gcloud cli to assign these permission to the user identity using which these scripts will be executed. User can follow either step `3.a.` or `3.b.` or `3.c.` to complete this step.
37
37
-**Host Project**
@@ -95,7 +95,7 @@ This command creates an execution plan, which lets you preview the changes that
95
95
96
96
## Examples
97
97
98
-
1. This example leverages the existing network and subnetwork. Network information like network_name, network_id and subnetword_id should be passed in the terraform.tfvars file. The terraform.tfvars should look like
98
+
1. This example leverages the existing network and subnetwork. Network information like network_name, network_id and subnetwork_id should be passed in the terraform.tfvars file. The terraform.tfvars should look like
0 commit comments