Skip to content

buildstar-online/modules-gcp-tf-vm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GCP Virtual Machine Terraform Module

Create a spot-instance on GCP with optional GPU. Designed to work with gcp-tf-base

Usage

See it in action at https://github.com/cloudymax/gcp-tf-starter

module "gcp-tf-vm" {

  source = "github.com/cloudymax/modules-gcp-tf-vm.git"

  project_id                  = var.project_id
  location                    = var.location
  main_availability_zone      = var.main_availability_zone
  big_robot_email             = var.big_robot_email
  machine_type                = "n1-standard-8"
  guest_accelerator           = "nvidia-tesla-p100"
  guest_accelerator_count     = 1
  provisioning_model          = "SPOT"
  instance_termination_action = "STOP"
  os_image                    = "ubuntu-os-cloud/ubuntu-2204-lts"
  disk_type                   = "pd-ssd"
  disk_size                   = 64
}

Requirements

No requirements.

Providers

Name Version
google n/a
random n/a

Modules

No modules.

Resources

Name Type
google_compute_address.static_ip resource
google_compute_firewall.allow-gow resource
google_compute_firewall.allow-monitoring resource
google_compute_firewall.allow-ssh resource
google_compute_firewall.allow-vnc resource
google_compute_firewall.allow-wg resource
google_compute_firewall.rules resource
google_compute_instance.compute_instance resource
random_pet.vm_name resource

Inputs

Name Description Type Default Required
big_robot_email n/a string n/a yes
disk_size n/a number n/a yes
disk_type n/a string n/a yes
guest_accelerator n/a string n/a yes
guest_accelerator_count n/a number n/a yes
instance_termination_action n/a string n/a yes
location n/a string n/a yes
machine_type n/a string n/a yes
main_availability_zone n/a string n/a yes
os_image n/a string n/a yes
project_id n/a string n/a yes
provisioning_model n/a string n/a yes
userdata n/a string "user-data.yaml" no

Outputs

Name Description
instance_ip_addr n/a

About

Create a spot VM on GCP using Terraform with optional GPU

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages