missing TF_VAR values fail to stop terraform plan/apply
I've discovered that missing TF_VAR variables fail to stop terraform plan/apply, as depicted below:
$ terraform validate
Success! The configuration is valid.
$ terraform plan
var.ansible_inventory_path
The path to write the ansible inventory file to
Enter a value:
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
module.ec2_mongodb.data.aws_ami.mongodb: Refreshing state...
module.ec2_mongodb.aws_security_group.allow_mongodb: Refreshing state... [id=sg-12345678901234567]
module.ec2_mongodb.aws_instance.mongodb_instance[0]: Refreshing state... [id=i-01234567890123456]
I expect missing TF variables would cause terraform to fail, and result in a failed job/pipeline.
This means a simple typo can cause a terraform pipeline to incorrectly plan/apply with invalid inputs.