fogg
fogg copied to clipboard
bug: Invalid variables aren't filtered out
just hit this bug (related to a feature I added):
https://github.com/chanzuckerberg/fogg/blob/b1a9415d604f8a5be7b43f96d8c8b1b65aed5084/apply/apply.go#L576-L586
if component.Variables
contains non-existing module variables, they aren't filtered out - the generated module invocation is invalid.
For some weird reason, the error wasn't caught (until I upgraded TF from 1.5.4
to 1.5.7
and terraform-aws-provider from ~> 4.0
to ~> 5.0
- I don't understand how I didn't get this error earlier because nothing indicates a change in the way evaluates the terraform configurations...
│ Error: Unsupported argument
│
│ on main.tf line 14, in module "foo":
│ 14: invalid_var = local.invalid_var
│
│ An argument named "invalid_var" is not expected here.