mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Add example on supporting both OpenTofu and Terraform versions to version-constraints.mdx (#2302)
Signed-off-by: Ludovico Magnocavallo <ludo@qix.it> Signed-off-by: Christian Mesh <christianmesh1@gmail.com> Co-authored-by: Oleksandr Levchenkov <ollevche@gmail.com>
This commit is contained in:
parent
1b00b465da
commit
e7f130a490
@ -93,3 +93,10 @@ versions do not match inexact operators such as `>=`, `~>`, etc.
|
||||
|
||||
- Root modules should use a `~>` constraint to set both a lower and upper bound
|
||||
on versions for each provider they depend on.
|
||||
|
||||
### Supporting both OpenTofu and Terraform Versions
|
||||
|
||||
- When configuration needs to be supported by both OpenTofu and Terraform, for example in modules
|
||||
which need to be consumed by both engines, use a `providers.tofu` file to specify
|
||||
the OpenTofu version constraint, overriding the constraint defined in `providers.tf`.
|
||||
[Read more about extension precedence](../../files/#extension-precedence).
|
||||
|
Loading…
Reference in New Issue
Block a user