I have a map of values (populated from Consul), which I use to configure my resources, however if values for optional variables are missing, I would like Terraform to act as it the parameter was not provided. For example:
resource "aws_db_instance" "db" {
engine = "${lookup(config_map, "db_engine", "postgres")}"
port = "${lookup(config_map, "db_port", "<pick default for the engine>")}"
}
If port is not given, Terraform picks a default value depending on the engine. Can I trigger this behavior explicitly?