-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Infracost reports are missing variable values from the terraform projects.
Steps to reproduce
File structure:
my_root_module\main.tf
my_root_module\vars\some_environment.tfvars
Our Terrateam config specifies the tfvars for the dirspace like "extra_args": ["-var-file=vars/${TERRATEAM_WORKSPACE}.tfvars"] and this works well for plans/applies.
Expected behavior
I expected that the Infracost code would use --terraform-var-file or --terraform-var if they were present in the workflow config's extra_args.
Actual behavior
Infracost logs like this:
INFO Found Terraform project "my_root_module-some_environment" at directory "my_root_module"
...
WARN Input values were not provided for following Terraform variables: "variable.some_var", "variable.some_other_var". Use --terraform-var-file or --terraform-var to specify them.
And that leads to it assuming 0 quantity on resources like container counts.
Terrateam version & environment details
Cloud-hosted terrateam; terraform 1.14.3. Big dynamic config_builder script.
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working