An automated Terraform project to deploy a secure, debian web server on Google Cloud Platform.
- VPC & Subnet: Custom-mode VPC with a dedicated regional subnetwork (10.0.1.0/24).
- Compute: e2-micro instance running Debian 11.
- Security: - Firewall HTTP: Open to the world (Port 80) for web traffic.
- Firewall SSH: Restricted to a specific admin IP (Port 22).
- Terraform installed.
- Google Cloud SDK (gcloud) installed and authenticated.
- A GCP Project ID.
- Clone this repository.
- Create a terraform.tfvars file (this file is git-ignored for security):
project_id = "your-gcp-project-id" my_home_ip = "x.x.x.x" # your public IP
- (Optional) If you want to change the location, edit the default values in variables.tf:
gcp region (Default: us-east4) gcp zone (Default: us-east4-a)
terraform init
terraform plan
terraform apply
To teardown infrastructure run:
terraform destroy