A module for lazy GCP instance creation via Terraform.
github_user
: A GitHub user to lookup allowed SSH keys
attached_disks
: List of disks to attach, default empty, each item is an object with attributessource
andname
image
: Image of the instance, defaultfedora-cloud/fedora-cloud-38
machine_type
: Instance type, defaulte2-small
metadata
: Metadata valuesname
: Name of the instance, random if nullnetwork_name
: Name of the instance's network, random if nullnetwork_tier
: Network tier for the instance, defaultSTANDARD
on_host_maintenance
: What to do during host maintenance,MIGRATE
orTERMINATE
, defaultTERMINATE
service_account_scopes
: List of service account scopes, default["cloud-platform"]
service_account
: Optional service account to associate with the instancesize
: Image size in GiB, default10
spot
: Is spot instance? defaulttrue
ssh_user
: A user name to set for authorized SSH keys, defaults togithub_user
subnetwork_name
: Name of the instance's subnetwork, random if nulltermination_action
: Instance termination action,STOP
orDELETE
, defaults toDELETE
provider "google" {
project = <project>
zone = <zone>
}
module "instance" {
source = "femnad/instance-module/gcp"
version = "0.23.2"
github_user = "femnad"
providers = {
google = google
}
}