Create a spot-instance on GCP with optional GPU. Designed to work with gcp-tf-base
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
}
No requirements.
Name | Version |
---|---|
n/a | |
random | n/a |
No modules.
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 |
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 |
Name | Description |
---|---|
instance_ip_addr | n/a |