Opentofu is a fork of Terraform.
At the moment the syntax is mostly the same, so using the same snippets for both languages make still sense. When they diverge in the future it might be better to maintain different snippets, but not now.