mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-21 10:47:34 -05:00
Signed-off-by: Janos <86970079+janosdebugs@users.noreply.github.com> Signed-off-by: Christian Mesh <christianmesh1@gmail.com> Co-authored-by: Christian Mesh <christianmesh1@gmail.com> Co-authored-by: James Humphries <jamesh@spacelift.io>
17 lines
670 B
Go
17 lines
670 B
Go
// Copyright (c) The OpenTofu Authors
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
// Copyright (c) 2023 HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package keyprovider
|
|
|
|
// Config is a struct annotated with HCL (and preferably JSON) tags that OpenTofu reads the user-provided configuration
|
|
// into. The Build function assembles the configuration into a usable key provider.
|
|
type Config interface {
|
|
// Build provides a key provider and an empty JSON-tagged struct to read the decryption metadata into. If the
|
|
// configuration is invalid, it returns an error.
|
|
//
|
|
// If a key provider does not need metadata, it may return nil.
|
|
Build() (KeyProvider, KeyMeta, error)
|
|
}
|