-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
45 lines (35 loc) · 761 Bytes
/
main.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
44
45
resource "google_compute_instance" "default" {
name = "test"
machine_type = "n1-standard-1"
zone = "eu-west1-a"
tags = ["foo", "bar"]
network_interface {
network = "default"
access_config {
// Ephemeral IP
}
}
boot_disk {
initialize_params {
image = "debian-cloud/debian-9"
}
}
service_account {
scopes = ["userinfo-email", "compute-ro", "storage-ro"]
}
}
resource "google_compute_firewall" "default" {
name = "test-firewall"
network = "${google_compute_network.default.name}"
allow {
protocol = "icmp"
}
allow {
protocol = "tcp"
ports = ["80" ]
}
source_ranges = ["0.0.0.0/0"]
}
resource "google_compute_network" "default" {
name = "default"
}