Provisioning GCP resources using Google Cloud Shell
Instead of using the GCP console, we can use Google Cloud Shell to provision all the resources. In the following example, the GCP architecture is shown in Figure 11.2, and we use the Cloud Shell commands to provision GCP resources, including network VPCs/subnets, VMs, and VPC peering. Please practice using them in Cloud Shell, and make sure you understand each step.
Figure 11.2 – A sample architecture for GCP Cloud Shell practice
- Create a project,VPC, and subnet:
gcloud projects create test10122021 --folder 464105225938 gcloud compute networks create vpc1 --project corvel-032021 --subnet-mode=custom gcloud compute networks subnets create subnet11 --network=vpc1 --range=10.10.1.0/24 --project corvel-032021 --region us-west1 gcloud compute networks subnets create subnet12 --network=vpc1 --range=10.10.2.0/24 --project corvel-032021 --region us-east1 gcloud compute networks create...