Man, there are still some basic terraform things t...
# terraform
d
Man, there are still some basic terraform things that allude me... How do I conditionally set an attribute on a resource block? This approach isn't working
Copy code
resource "aws_codedeploy_deployment_group" "erx" {
// omitted for brevity
  ec2_tag_set {
    ec2_tag_filter {
      key   = "Component"
      type  = "KEY_AND_VALUE"
      value = "${local.app_short_name}-web"
    }
    local.has_job_server == true ? : 
    ec2_tag_filter {
      key   = "Component"
      type  = "KEY_AND_VALUE"
      value = "${local.app_short_name}-job"
    } 
    : ""
  
  }
}