Skip to content

davidonlinearchive/gcp-terraform-starter

Repository files navigation

GCP Secure Web Infrastructure (Terraform)

An automated Terraform project to deploy a secure, debian web server on Google Cloud Platform.

Architecture

  • 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).

Getting Started

Prerequisites

  1. Terraform installed.
  2. Google Cloud SDK (gcloud) installed and authenticated.
  3. A GCP Project ID.

Setup

  1. Clone this repository.
  2. 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
  3. (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)
    

Deployment

  terraform init
  terraform plan
  terraform apply

Teardown

To teardown infrastructure run: terraform destroy

About

An automated Terraform project to deploy a secure, debian web server on Google Cloud Platform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages