Create a subnet in GCP using the command line

0 votes

Hi Guys,

I have created one VPC in GCP Cloud. I want to create one subnet in this VPC from the command line. How can I do that?

Nov 9, 2020 in GCP by akhtar
• 38,210 points
109 views

1 answer to this question.

0 votes

Hi@akhtar,

You can create one subnet in a VPC to launch an instance. The following command shows how to create a subnet in a VPC.

$ gcloud compute networks subnets create my-subnet-1 --network my-vpc --range 10.240.0.0/24
answered Nov 9, 2020 by MD
• 95,300 points

Related Questions In GCP

0 votes
1 answer
+2 votes
1 answer

Create a firewall rule on GCP Cloud from command line.

Hi@akhtar, You need to configure GCP Cloud SDK ...READ MORE

answered Aug 24, 2020 in GCP by MD
• 95,300 points
594 views
0 votes
1 answer

How to change the project in GCP using CLI command?

Hi@akhtar, If you configured GCP SDK in your ...READ MORE

answered Sep 13, 2020 in GCP by MD
• 95,300 points
428 views
0 votes
1 answer

How to authenticate with the correct account in GCP from Command Line?

Hi@akhtar, You can check your accounts from the ...READ MORE

answered Sep 24, 2020 in GCP by MD
• 95,300 points
112 views
+2 votes
1 answer

How to create a project in GCP Cloud?

Hi@akhtar, To deploy your app on App Engine, ...READ MORE

answered Aug 22, 2020 in GCP by MD
• 95,300 points
154 views
+2 votes
1 answer

How to create a project from GCP Cloud Shell?

Hi@akhtar, GCP shell has a command named gcloud. ...READ MORE

answered Aug 22, 2020 in GCP by MD
• 95,300 points
307 views
+2 votes
1 answer

How to enable new services to a project in GCP Cloud?

Hi@akhtar, You can enable new services to your ...READ MORE

answered Aug 22, 2020 in GCP by MD
• 95,300 points
237 views
0 votes
1 answer

How to create a new project in GCP using the command line?

Hi@akhtar, You need to configure GCP SDK in ...READ MORE

answered Nov 9, 2020 in GCP by MD
• 95,300 points
143 views
+2 votes
1 answer

How to create a VPC on GCP from command line?

Hi@akhtar, To create a personal network, you need ...READ MORE

answered Aug 24, 2020 in GCP by MD
• 95,300 points
331 views