How to create a VPC in GCP Cloud using Terraform code

0 votes

Hi Guys,

I am new to Terraform. I want to create a VPC in GCP Cloud using Terraform code. Hw can I do that?

Sep 13, 2020 in Terraform by akhtar
• 38,260 points
1,622 views

1 answer to this question.

0 votes

Hi@akhtar,

You can create your own VPC in the GCP cloud using Terraform code. Terraform has a resource google_compute_network. This resource is used to create VPC from Terraform.

resource "google_compute_network" "custom-test" {
  provider = google-beta
  name                    = "l7lb-test-network"
  auto_create_subnetworks = false
}


Hope it helps!!

To know more about Google Cloud, join Google Cloud platform certification course today.

Thank You!

answered Sep 13, 2020 by MD
• 95,460 points

Related Questions In Terraform

0 votes
1 answer

How to create a route table in AWS using Terraform code?

Hi@akhtar, You can use aws_route_table resources in your ...READ MORE

answered Jul 21, 2020 in Terraform by MD
• 95,460 points
5,789 views
0 votes
2 answers

How to create a customized IAM policy in GCP using Terraform?

You can visit Terraform official site for ...READ MORE

answered Sep 14, 2020 in Terraform by Peter
• 180 points
1,820 views
0 votes
1 answer

How to create a security rule in GCP using Terraform?

Hi@akhtar, A Security Policy defines an IP blacklist ...READ MORE

answered Sep 14, 2020 in Terraform by MD
• 95,460 points
1,250 views
0 votes
1 answer

How to create a folder in S3 bucket using terraform?

Hi@akhtar, You can use aws_s3_bucket_object resource to create one ...READ MORE

answered Jun 11, 2020 in Terraform by MD
• 95,460 points
10,881 views
0 votes
1 answer

How to create a service account in GCP using Terraform?

Hi@akhtar, You can create a service account in ...READ MORE

answered Sep 13, 2020 in Terraform by MD
• 95,460 points
2,409 views
0 votes
1 answer

How to create subnets in GCP cloud using Terraform?

Hi@akhtar, You need to create a network first. ...READ MORE

answered Sep 13, 2020 in Terraform by MD
• 95,460 points
2,023 views
0 votes
1 answer

How to launch an instance in GCP using Terraform?

Hi@akhtar, You can use the google_compute_instance resource in ...READ MORE

answered Sep 12, 2020 in Terraform by MD
• 95,460 points
814 views
0 votes
1 answer

Create a project in GCP using Terraform.

Hi@akhtar, Terraform has a resource named google_project. This ...READ MORE

answered Sep 13, 2020 in Terraform by MD
• 95,460 points
974 views
0 votes
1 answer

How to create a service account key in GCP Cloud using Terraform?

Hi@akhtar, You need to create a service account ...READ MORE

answered Sep 13, 2020 in Terraform by MD
• 95,460 points
1,657 views
0 votes
1 answer

How to create a VPC in AWS using Terraform?

Hi@akhtar, You can find the script in the ...READ MORE

answered Jul 21, 2020 in Terraform by MD
• 95,460 points
1,322 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP