From 7841dcaae9086b5b3510f0f562a9f648217a36d4 Mon Sep 17 00:00:00 2001 From: 08sm80 Date: Fri, 4 Oct 2024 15:06:07 +0530 Subject: [PATCH] update --- main.tf | 14 +++++++------- provider.tf | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/main.tf b/main.tf index 03543f0..ee595c4 100644 --- a/main.tf +++ b/main.tf @@ -37,12 +37,12 @@ resource "google_compute_instance" "gce_vm1" { ninja = "level-1" enable-oslogin = false startup-script = <<-EOT -#! /bin/bash -sudo apt update -sudo apt install busybox -y -echo "Hello, World" > index.xhtml -nohup busybox httpd -f -p 8080 & -EOT + #!/bin/bash + sudo apt update && sudo apt upgrade -y + sudo apt install busybox -y + echo "Hello, World" > index.xhtml + nohup busybox httpd -f -p 8000 & + EOT } @@ -60,7 +60,7 @@ resource "google_compute_firewall" "basic_access" { name = "basic-access" allow { protocol = "TCP" - ports = ["80", "443", "22", "8080"] + ports = ["80", "443", "22", "8000"] } source_ranges = ["0.0.0.0/0"] } diff --git a/provider.tf b/provider.tf index 6d14299..a501bb6 100644 --- a/provider.tf +++ b/provider.tf @@ -11,3 +11,4 @@ terraform { # terraform provider for GCP } } } + \ No newline at end of file