I have the following condition:
resource "aws_elastic_beanstalk_application" "service" {
appversion_lifecycle {
service_role = "service-role"
delete_source_from_s3 = "${var.env == "production" ? false : true}"
}
}
If var.env is set to production, I get the result I want.
However if var.env is not defined, terraform plan will fail because the variable was never defined.
How can I get this to work, without ever having to define that variable?