MEDIUM
Source
Trivy
ID
AVD-GCP-0045

Instances should have Shielded VM integrity monitoring enabled

Integrity monitoring helps you understand and make decisions about the state of your VM instances.

Impact

No visibility of VM instance boot state.

Follow the appropriate remediation steps below to resolve the issue.

Enable Shielded VM Integrity Monitoring

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 resource "google_compute_instance" "good_example" {
   name         = "test"
   machine_type = "e2-medium"
   zone         = "us-central1-a"
 
   tags = ["foo", "bar"]
 
   boot_disk {
     initialize_params {
       image = "debian-cloud/debian-9"
     }
   }
 
   // Local SSD disk
   scratch_disk {
     interface = "SCSI"
   }
 
   shielded_instance_config {
     enable_integrity_monitoring = true
   }
 }