Here are some patterns for writing environment-specific settings within TF modules used across all environments.
This is an example of creating a VCL snippet only when var.isProd is true. The number 1
in var.isProd ? [1] : []
has no specific meaning. The key point is passing a list with one element to for_each when true.
dynamic "snippet" {
for_each = var.isProd ? [1] : []