top | item 43068661

(no title)

manfre | 1 year ago

Instead of env conditionals, I strongly recommended feature/functionality conditionals or variables. E.g. var.create_s3 is better than var env == 'prod'

discuss

order

baby_souffle|1 year ago

+1 for this. Do as much as you can in modules and write each of your modules to have a simple enable or disable input.

bloopernova|1 year ago

I just wanted to clarify: are you referring to this pattern?

  module "cool_name" {
    count  = var.create_cool_name ? 1 : 0
  }
I've always wanted a simple enable/disable syntax for modules in tf.