mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-04-12 00:00:32 -04:00
Signed-off-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com> Signed-off-by: ollevche <ollevche@gmail.com> Co-authored-by: Oleksandr Levchenkov <ollevche@gmail.com>
26 lines
586 B
Go
26 lines
586 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 external
|
|
|
|
import (
|
|
"github.com/opentofu/opentofu/internal/encryption/keyprovider"
|
|
)
|
|
|
|
type Config struct {
|
|
Command []string `hcl:"command"`
|
|
}
|
|
|
|
func (c *Config) Build() (keyprovider.KeyProvider, keyprovider.KeyMeta, error) {
|
|
if len(c.Command) < 1 {
|
|
return nil, nil, &keyprovider.ErrInvalidConfiguration{
|
|
Message: "the command option is required",
|
|
}
|
|
}
|
|
return &keyProvider{
|
|
command: c.Command,
|
|
}, &MetadataV1{}, nil
|
|
}
|