Home > Blockchain >  Dynamically run terraform block based on input variable value
Dynamically run terraform block based on input variable value

Time:11-05

The Problem:

AWS doesn't support enhanced monitoring for t3.small instances which is what we use for smaller deployments of RDS but does on larger instance sizes for RDS. We want to disable it in Terraform when the instance class is t3.

Looking at the terraform resource docs: enter image description here

Thanks for your help. Probably something small I'm just missing or misunderstood about terraform conditionals.

CodePudding user response:

You're missing an = in your condition. Change it to this:

var.monitoring_interval == "0" ? var.cluster_instance_count : 0
  • Related