Create VPC, Subnet, Firewall Rules, and VM in GCP
In the "Code Editor" tab, open the main.tf
file.
Your task: Create a VPC network named my-vpc
, a subnet named my-subnet
in us-central1
with CIDR 10.0.1.0/24
, firewall rules to allow HTTP (tcp:80
) and SSH (tcp:22
) traffic from any source (0.0.0.0/0
), and a Compute Engine VM named my-vm
with machine type f1-micro
using the debian-cloud/debian-11
image, connected to my-subnet
.
GitOps Repository
- 📁 /root/learn-terraform-gcp-basic-resources
- 📄 provider.tf
- 📄 main.tf