Move provider version to required_providers
ProprietaryIn Terraform 0.13+, version constraints should be specified in the terraform { required_providers { ... } } block instead of the provider block. This recipe removes the version attribute from provider blocks and records it in the required_providers block of the same module (directory), creating that block when it is missing. A provider version which conflicts with the one already declared in required_providers is left in place.
org. openrewrite. terraform. MoveProviderVersionToRequiredProvidersOptional
The default registry namespace to use for provider source addresses. Defaults to hashicorp.
mod run . --recipe= org. openrewrite. terraform. MoveProviderVersionToRequiredProvidersInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.