Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New terraform test support for variables in run block causes module evaluation to fail #3046

Open
brettcurtis opened this issue Apr 29, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@brettcurtis
Copy link

I've been messing around with the new native terraform test, and I think it manifests an issue with infracost in how you can add variables to the test files.

Check out this repo: https://github.com/osinfra-io/terraform-google-vpc/tree/main/tests

We can set variables in the test files instead of passing them in tfvars. That's probably why I see what I do in the Infracost UI.

unnamed

@hugorut hugorut added the enhancement New feature or request label Apr 30, 2024
@hugorut
Copy link
Contributor

hugorut commented Apr 30, 2024

Thanks for raising this @brettcurtis. That's an interesting use case. How do you see Infracost interacting with these "tests" considering they are not actually real Infrastructure? What would be your ideal solution?

@brettcurtis
Copy link
Author

I'd want to see the cost of the modules in the fixtures directory in. The linked repo isn't the best example but if you look at this one: https://github.com/osinfra-io/terraform-google-project/tree/main/tests/fixtures it would be nice to know the cost of the "default" and "logging" module mostly so the developer writing the module understood code change cost impact but also for the consumer or the module to get an idea of how much it might cost to use it via the badges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants