Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptSecrets ¶
func DecryptSecrets(ctx *hcl.EvalContext, body hcl.Body) (hcl.Body, hcl.Diagnostics)
DecryptSecrets decrypts secrets in the given HCL body. Example:
ethereum {
key "default" {
address = "0x123...abc"
keystore_path = "/path/to/keystore"
passphrase_file = "/path/to/passwords"
}
}
secrets {
foo = {
"0x123...abc" = "0x234..bcd"
"0x1a3...abc" = "0x2a4..bcd"
"0x1b3...abc" = "0x2b4..bcd"
}
}
decrypted = secrets.foo
In this example decrypted will be equal to the decrypted value of "0x234...bcd"
NOTE: To use in test scripts, there is an env variable XXX_SECRETS_SKIP_DECRYPT which allow to skip decryption and just check that secret is set set. If XXX_SECRETS_SKIP_DECRYPT is set to true, then actual decryption step will be skipped and secret value will be replaced with just "<encrypted>".
NOTE: if there is no secret value for configured ethereum public key, then secrets.foo will return a hcl.Diagnostics that value is not set.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.