forked from cxzczxzc/gcp-service-hardening
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
35 lines (28 loc) · 758 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
# module "gce" {
# source = "./GCE"
# }
# resource "google_service_account" "default" {
# account_id = "service_account_id"
# display_name = "Service Account"
# }
resource "google_compute_instance" "intentionally_vulnerable_test" {
name = "terraform-test"
machine_type = "e2-medium"
zone = var.region
boot_disk {
initialize_params {
image = "debian-cloud/debian-11"
}
}
network_interface {
network = "default"
access_config {
// Ephemeral public IP
}
}
service_account {
# Google recommends custom service accounts that have cloud-platform scope and permissions granted via IAM Roles.
# email = google_service_account.default.email
scopes = ["cloud-platform"]
}
}