Skip to content

Commit 24a5590

Browse files
Merge pull request #2 from pradeepbhadani/update
Update image
2 parents 2abfb19 + 11458fd commit 24a5590

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
.terraform.d
88
crash.log
99
terraform.tfstate.d/
10+
.terraform.lock*
1011

1112
# Mac OS
1213
._*

terraform.tfvars

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project_id = "gcp-project-id" # Update: Replace with GCP Project ID.
22
labels = {
3-
"environment" = "test"
3+
"environment" = "dev"
44
"team" = "devops"
55
"application" = "webserver"
66
}

variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ variable "zone" {
1818
variable "name" {
1919
description = "Web server name."
2020
type = string
21-
default = "my-webserver"
21+
default = "my-nginx-webserver"
2222
}
2323

2424
variable "machine_type" {

vm.tf

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
data "google_compute_image" "debian" {
2-
family = "ubuntu-1804-lts"
3-
project = "gce-uefi-images"
1+
data "google_compute_image" "ubuntu" {
2+
family = "ubuntu-2204-lts"
3+
project = "ubuntu-os-cloud"
44
}
55

6-
# Creates a GCP VM Instance.
6+
# Creates a GCP VM Instance. Metadata Startup script install the Nginx webserver.
77
resource "google_compute_instance" "vm" {
88
name = var.name
99
machine_type = var.machine_type
@@ -13,7 +13,7 @@ resource "google_compute_instance" "vm" {
1313

1414
boot_disk {
1515
initialize_params {
16-
image = data.google_compute_image.debian.self_link
16+
image = data.google_compute_image.ubuntu.self_link
1717
}
1818
}
1919

0 commit comments

Comments
 (0)