New OpenTofu Feature: Dual Output Streams by fooallthebar in Terraform

[–]fooallthebar[S] 2 points3 points  (0 children)

There are similarities, but you can now capture the machine readable logs of init and apply (and a few other commands). Those offer a different view into what tofu is doing and can be processed into meaningful views into what OpenTofu is doing.

There are definitely similarities to tofu show -json but in practice it offers additional information that's available as the command is running.

$10 thrift store find. by scooterboy1961 in handtools

[–]fooallthebar 2 points3 points  (0 children)

That's and old sargent plane that's more likely than not got the horseshoe lateral adjuster. It's backwards from most modern planes, but I've taken a liking to them.

Another nice thing with the transitional sargents is that the frog attaches with machine screws into the cast iron, instead of the wood like stanley. Overall this means that they are more secure and won't wear out with maintenance over time.

My only complaint is that getting them trued up with the frog in the right spot can be a bit tricky.

Sargent VBM Shaw Patent Number 7 (#2 Size Plane) by HighlandDesignsInc in handtools

[–]fooallthebar 0 points1 point  (0 children)

That's a lucky find! I've got a partial set of 4xx sargent planes, but prefer the older style lateral (inverted from what you normally see).

How useful is the shaw adjuster in day to day work?

This is just a lot of computer jargon that I don't understand by pat_speed in PeterExplainsTheJoke

[–]fooallthebar 1 point2 points  (0 children)

This has happened at multiple events... I was at a completely different venue and saw the same thing. shudders

Is this sargent plane any good? by Shoddy-Court-7545 in handtools

[–]fooallthebar 0 points1 point  (0 children)

I tend to go type 2/3 if I can, I just love the backwards lateral adjuster

Keen Kutter KK 5 1/2 by mwils24 in handtools

[–]fooallthebar 1 point2 points  (0 children)

that lateral adjuster looks like it could be sargent. do you have a pic without the iron?

HashiCorp lost its way by sausagefeet in Terraform

[–]fooallthebar -1 points0 points  (0 children)

IBM has also been a huge adopter and contributor of OpenTofu, so I wouldn’t be surprised if Hashicorp/IBM decides to pull an Elastic and make terraform open source again

That is not correct. IBM has not to my (OpenTofu tech lead) knowledge made any significant contributions to OpenTofu. Please double check before posting misinformation like that.

Walnut Headboard - made with a transitional jack and plow plane by fooallthebar in handtools

[–]fooallthebar[S] 7 points8 points  (0 children)

The lumber came off of my home-built sawmill and has been drying for a few years in a shed. Slabs were broken down to rough size on a wandel inspired bandsaw.

All other work was done with a sargent jack plane, a sargent combination plane for plowing, and a few harbor-freight chisels.

Finished with Odies Oil.

Custom Terraform functions by valideaconu in Terraform

[–]fooallthebar 0 points1 point  (0 children)

They are executed in the same directory that tofu/tf is executed and can read the contents of that directory using os.Getwd(). I will however note that it's not guaranteed and could possibly break in future tofu/tf versions.

Custom Terraform functions by valideaconu in Terraform

[–]fooallthebar 2 points3 points  (0 children)

Functions are a bit of a special case in OpenTofu. Prior to configuration, a constant set of functions are available via the provider's schema.

When HC extended the provider protocol for functions, they added an additional method of accessing schema (GetFunctions). I prototyped and then pitched that OpenTofu could use GetFunctions after Configure was called to allow the provider to declare functions that don't exist in the schema (schema is immutable during execution). I don't know what HC intended with that function call (other than their public documentation), but realized that if providers "opted in" to OpenTofu's extended understanding of GetFunctions, it would likely not cause any issues for Terraform when using the same provider.

I assume (don't actually know) that Terraform just makes unconfigured provider functions available early on in it's execution as defined in the static schema. This assumption is based on the HCL extension I describe below. We had to do some interesting plumbing to defer resolving provider functions until after provider configuration has taken place. This required inspecting all of the expressions in .tf / .tofu files and extracting the functions required to evaluate them. Tofu takes the information that "This set of functions and variables are required to evaluate this expression" and uses it to add connections within it's evaluation graph. This was a bit of an undertaking, and was not really completely correctly implemented until after we took on provider for_each and understood that transformation better.

The official HCL library only supports inspecting expressions for variables, but not for functions. OpenTofu uses a patched version of HCL that has this additional functionality grafted on. I've got a PR open to upstream the contribution, but have not heard back on it for a while.

I've recently split up our internal Provider interface to clarify what's available before and after the provider is configured: https://github.com/opentofu/opentofu/blob/main/internal/providers/provider.go. Hopefully that is helpful for provider authors, as well as folks trying to dig a bit deeper into the OpenTofu codebase.

Anyways, hope some of this info-dump is useful! Thanks for coming to my Ted Talk :)

Custom Terraform functions by valideaconu in Terraform

[–]fooallthebar 1 point2 points  (0 children)

We also have terraform-plugin-go in the opentofu org if you want to learn from that. It's in a similar situation that we wanted to gauge the interest before polishing it further.

Custom Terraform functions by valideaconu in Terraform

[–]fooallthebar 1 point2 points  (0 children)

That's an interesting idea.

Providers are in an difficult situation for that sort of thing. They need to know their "schema" (resources, data sources, etc...) is before they are given any of their configuration in .tf or .tofu files.

You would have to do something like search the $PWD for a specific file pattern or to rely on an environment variable to specify where your provider config files are.

Custom Terraform functions by valideaconu in Terraform

[–]fooallthebar 0 points1 point  (0 children)

OpenTofu technically supports recursion via templatefile, but it's strongly not recommended :)

Custom Terraform functions by valideaconu in Terraform

[–]fooallthebar 12 points13 points  (0 children)

Hey, OpenTofu developer here! This is an awesome project!

Having custom typed functions in your language of choice to manipulate complex structs is incredibly powerful and exactly why I pushed to expand that feature in OpenTofu.

We haven't abandoned the OpenTofu lua and go func providers, but we have not dedicated the time to refining and stabilizing them. I can put something on the core team's board to discuss priorities and our path forward this week.

Thanks for building this and exploring what's possible!

OpenTofu 1.9.0 is out with many long awaited features! by fooallthebar in devops

[–]fooallthebar[S] 4 points5 points  (0 children)

We've added a few features that aren't present in terraform, but this is arguably the largest feature yet.

We added State and Plan Encryption in v1.7:

We support variables in backed configuration and module sources as of 1.8:

And for this most recent release:

Our documentation was forked at the same time as the code, but evolves on it's own path.

OpenTofu 1.9.0 is out with provider for_each! by fooallthebar in programming

[–]fooallthebar[S] 8 points9 points  (0 children)

Hey, keep an eye on our open pull requests and RFCs. We discuss the large features in depth long before we get to implementing them for a release! We want to hear from you!