Slide 23
Slide 23 text
import "tfplan"
allowed_types = ["n1-standard-1", "n1-standard-2"]
clusters = tfplan.resources.google_container_cluster
machine_type_allowed = rule {
all clusters as name, instances {
all instances as index, r {
r.applied.node_config[0].machine_type in
allowed_types
}
}
}
main = rule { machine_type_allowed }