Skip to content

Instantly share code, notes, and snippets.

@priom
Last active January 9, 2019 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save priom/cbc011ad7a30482817f1db0bdd5a9a21 to your computer and use it in GitHub Desktop.
Save priom/cbc011ad7a30482817f1db0bdd5a9a21 to your computer and use it in GitHub Desktop.
provider "google" {
credentials = "${file("credentials.json")}"
project = "ENTER_YOUR_PROJECT_ID_HERE"
}
resource "google_compute_instance" "name" {
name = "ENTER_YOUR_INSTANCE_NAME_HERE",
zone = "us-east1-b",
machine_type = "n1-standard-1",
min_cpu_platform = "Intel Skylake"
tags = ["http-server", "https-server"]
boot_disk {
initialize_params {
image = "ubuntu-1804-lts"
type = "pd-standard"
size = "40"
}
}
network_interface {
network = "default"
access_config {}
}
metadata_startup_script = "sudo apt update -y && sudo apt upgrade -y && sudo apt-get install software-properties-common -y && sudo add-apt-repository ppa:ethereum/ethereum -y && sudo apt update -y && sudo apt install ethereum -y && sudo curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh && sudo bash nodesource_setup.sh && sudo apt install -y nodejs"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment