mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-16 11:42:58 -06:00
ebcf7455eb
* Rename module name from "github.com/hashicorp/terraform" to "github.com/placeholderplaceholderplaceholder/opentf". Signed-off-by: Jakub Martin <kubam@spacelift.io> * Gofmt. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Regenerate protobuf. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix comments. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Undo issue and pull request link changes. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Undo comment changes. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Fix comment. Signed-off-by: Jakub Martin <kubam@spacelift.io> * Undo some link changes. Signed-off-by: Jakub Martin <kubam@spacelift.io> * make generate && make protobuf Signed-off-by: Jakub Martin <kubam@spacelift.io> --------- Signed-off-by: Jakub Martin <kubam@spacelift.io>
29 lines
865 B
Go
29 lines
865 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package terraform
|
|
|
|
import (
|
|
"github.com/placeholderplaceholderplaceholder/opentf/internal/tfdiags"
|
|
|
|
"github.com/placeholderplaceholderplaceholder/opentf/internal/configs"
|
|
)
|
|
|
|
// CheckCoreVersionRequirements visits each of the modules in the given
|
|
// configuration tree and verifies that any given Core version constraints
|
|
// match with the version of Terraform Core that is being used.
|
|
//
|
|
// The returned diagnostics will contain errors if any constraints do not match.
|
|
// The returned diagnostics might also return warnings, which should be
|
|
// displayed to the user.
|
|
func CheckCoreVersionRequirements(config *configs.Config) tfdiags.Diagnostics {
|
|
if config == nil {
|
|
return nil
|
|
}
|
|
|
|
var diags tfdiags.Diagnostics
|
|
diags = diags.Append(config.CheckCoreVersionRequirements())
|
|
|
|
return diags
|
|
}
|