terraform/ecc-gcp-152-vm_instances_without_custom_metadata/green/vm_instance.tf (24 lines of code) (raw):
data "google_compute_image" "this" {
family = "debian-10"
project = "debian-cloud"
}
resource "google_compute_instance" "this" {
name = var.instance_name
machine_type = "f1-micro"
zone = var.zone
boot_disk {
initialize_params {
image = data.google_compute_image.this.self_link
}
}
network_interface {
network = var.network
}
metadata = {
foo = "true"
}
labels = {
custodianrule = "ecc-gcp-152-vm_instances_without_custom_metadata"
compliancestatus = "green"
}
}