Skip to content

Commit

Permalink
Updates variables
Browse files Browse the repository at this point in the history
  • Loading branch information
SaahilNotSahil committed Nov 22, 2023
1 parent 246db63 commit a73457d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
29 changes: 26 additions & 3 deletions infra/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
data "google_client_openid_userinfo" "me" {
}

resource "google_os_login_ssh_public_key" "default" {
user = data.google_client_openid_userinfo.me.email
key = file("../ssh/gcp.pub")
}

resource "google_compute_instance" "kubenode1" {
boot_disk {
auto_delete = true
Expand All @@ -22,7 +30,12 @@ resource "google_compute_instance" "kubenode1" {
}

machine_type = "e2-medium"
name = "kubenode1"

metadata = {
enable-oslogin = "true"
}

name = "kubenode1"

network_interface {
access_config {
Expand Down Expand Up @@ -78,7 +91,12 @@ resource "google_compute_instance" "kubenode2" {
}

machine_type = "e2-medium"
name = "kubenode2"

metadata = {
enable-oslogin = "true"
}

name = "kubenode2"

network_interface {
access_config {
Expand Down Expand Up @@ -134,7 +152,12 @@ resource "google_compute_instance" "kubenode3" {
}

machine_type = "e2-medium"
name = "kubenode3"

metadata = {
enable-oslogin = "true"
}

name = "kubenode3"

network_interface {
access_config {
Expand Down
2 changes: 2 additions & 0 deletions infra/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ variable "gcp_region" {}
variable "gcp_svc_email" {}

variable "gcp_svc_scopes" {}

variable "ssh_keys" {}

0 comments on commit a73457d

Please sign in to comment.