Skip to content

Instantly share code, notes, and snippets.

@luhonghai
Created December 18, 2019 05:13
Show Gist options
  • Save luhonghai/d61953e86a1192f3a7abc55cc74e8a1b to your computer and use it in GitHub Desktop.
Save luhonghai/d61953e86a1192f3a7abc55cc74e8a1b to your computer and use it in GitHub Desktop.
resource "google_compute_instance" "sontn-master01" {
boot_disk {
auto_delete = "true"
device_name = "sontn-master01"
initialize_params {
image = "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20191204"
size = "20"
type = "pd-standard"
}
}
allow_stopping_for_update = "true"
can_ip_forward = "true"
deletion_protection = "false"
enable_display = "false"
machine_type = "n1-standard-1"
name = "sontn-master01"
network_interface {
access_config {
nat_ip = ""
network_tier = "PREMIUM"
}
network = "https://www.googleapis.com/compute/v1/projects/vinid-sandbox/global/networks/default"
network_ip = ""
subnetwork = "https://www.googleapis.com/compute/v1/projects/vinid-sandbox/regions/asia-east1/subnetworks/default"
subnetwork_project = "vinid-sandbox"
}
project = "vinid-sandbox"
scheduling {
automatic_restart = "false"
on_host_maintenance = "TERMINATE"
preemptible = "true"
}
tags = ["https-server", "http-server"]
zone = "asia-east1-a"
metadata_startup_script = "sysctl -w net.ipv4.conf.all.forwarding=1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment