Repository navigation
c3x v0.3.8: OpenTofu support #79
andreacappelletti97
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
c3x now reads OpenTofu projects natively, as of v0.3.8.
c3x estimates the monthly cost of infrastructure code before you apply it, statically: no
init, no credentials, no state. Until now OpenTofu projects mostly worked because the syntax is shared, but anything OpenTofu-specific was ignored or mispriced.What works now
.tofufiles. They're read alongside.tf, and amain.tofureplaces themain.tfof the same name, as OpenTofu does. Projects that ship both files so they run under either tool aren't counted twice.Provider
for_each. Each resource instance is priced in the region of the provider instance it uses:Plan JSON from
tofu show -json, the same as Terraform's.We checked this against OpenTofu 1.12.6 itself: for a test project, c3x reads the same resources OpenTofu plans, and gives the same total from the directory as from the plan.
Also fixed, for Terraform users too
count/for_eachinstances could be compared against the wrong baseline, hiding a change to one instance.file,templatefile) print a warning instead.If you use
c3x top --format targetswith a plan JSON, please read the note at the top of the release notes — v0.3.5 to v0.3.7 emitted whole-resource targets forfor_eachinstances.If c3x misreads something in your OpenTofu project, open an issue with the snippet. That's the fastest way to get it fixed.
All reactions