-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgoogle.tf
43 lines (32 loc) · 981 Bytes
/
google.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// This configures the Google Cloud provider
provider "google" {
credentials = "${file("../account.json")}"
project = "sinuous-country-156711"
region = "asia-northeast1"
}
// I now want to create an instance
resource "google_compute_disk" "yolo" {
name = "test-disk"
type = "pd-ssd"
zone = "asia-northeast1-c"
size = 80
}
resource "google_compute_instance" "default" {
name = "terraform-instance"
machine_type = "custom-4-16384" #(To create a custom machiene with 2 CPUs and 16GB of memory)
zone = "asia-northeast1-c"
description = "A GCE VM setup with terraform"
disk {
image = "ubuntu-os-cloud/ubuntu-1604-lts" # image-project/image-family
}
disk {
disk = "test-disk"
}
tags = ["browser-apps"]
network_interface {
network = "default"
access_config { # This allows you to ssh into the machiene which is of course very useful!
}
}
metadata_startup_script = "${file("bootstrap.sh")}"
}