github.com/opentofu/opentofu@v1.7.1/internal/encryption/method/config.go (about) 1 // Copyright (c) The OpenTofu Authors 2 // SPDX-License-Identifier: MPL-2.0 3 // Copyright (c) 2023 HashiCorp, Inc. 4 // SPDX-License-Identifier: MPL-2.0 5 6 package method 7 8 // Config describes a configuration struct for setting up an encryption Method. You should always implement this 9 // interface with a struct, and you should tag the fields with HCL tags so the encryption implementation can read 10 // the .tf code into it. For example: 11 // 12 // type MyConfig struct { 13 // Key string `hcl:"key"` 14 // } 15 // 16 // func (m MyConfig) Build() (Method, error) { ... } 17 type Config interface { 18 // Build takes the configuration and builds an encryption method. 19 // TODO this may be better changed to return hcl.Diagnostics so warnings can be issued? 20 Build() (Method, error) 21 }