CKV_GCP_31 - example.tf update (NETWORKING)
@@ -1252,17 +1252,11 @@ resource "google_compute_instance" "bad-example" {
name = "test"
machine_type = "n1-standard-1"
zone = "us-central1-a"
- boot_disk {
- initialize_params {
- image = "debian-cloud/debian-9"
- }
- }
- network_interface {
- network = "default"
- access_config {
- // Ephemeral IP
- }
+ service_account {
+ scopes = ["https://www.googleapis.com/auth/cloud-platform", "compute-ro", "storage-ro"]
}
+ boot_disk {}
+ network_interface {}
}
resource "google_compute_instance" "good-example" {
@@ -1270,7 +1264,7 @@ name = "test"
machine_type = "n1-standard-1"
zone = "us-central1-a"
service_account {
- scopes = []
+ scopes = ["https://www.googleapis.com/auth/cloud-platform", "compute-ro", "storage-ro"]
email = "example@email.com"
}
boot_disk {}
