FAKE - F# Make - A DSL for build tasks and more FAKE
6.0.0

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

Vault Module

Provides a encrypted store of variables to prevent accidental leakage Please read the documentation

Types

Type Description

KeyInfo

The key used to decrypt/encrypt variables

Variable

The vault variable type

Vault

The vault which stores the encrypts values

Functions and values

Function or value Description

Vault.createKey file

Full Usage: Vault.createKey file

Parameters:
    file : string option - The secret file to use to create the key

Returns: KeyInfo

Create a new key with the given path to the secret file (or Path.GetTempFileName() otherwise)

file : string option

The secret file to use to create the key

Returns: KeyInfo

Vault.decryptVariable key base64Val

Full Usage: Vault.decryptVariable key base64Val

Parameters:
    key : KeyInfo - The file with the key
    base64Val : string - The base64 encoded value to decrypt

Returns: string

Decrypt a given base64 encoded string and return the utf-8 string of the result

key : KeyInfo

The file with the key

base64Val : string

The base64 encoded value to decrypt

Returns: string

Vault.empty

Full Usage: Vault.empty

Returns: Vault

An empty vault without any variables

Returns: Vault

Vault.encryptVariable key value

Full Usage: Vault.encryptVariable key value

Parameters:
    key : KeyInfo - The file with the key
    value : string - The utf-8 value to encrypt

Returns: string

Encrypt the given utf-8 string and return the base64 encoded result

key : KeyInfo

The file with the key

value : string

The utf-8 value to encrypt

Returns: string

Vault.fromEncryptedVariables key vars

Full Usage: Vault.fromEncryptedVariables key vars

Parameters:
    key : KeyInfo - The encryption/decryption key
    vars : seq<Variable> - The vault variables

Returns: Vault

Read a vault from the given encrypted variables

key : KeyInfo

The encryption/decryption key

vars : seq<Variable>

The vault variables

Returns: Vault

Vault.fromEnvironmentVariable envVar

Full Usage: Vault.fromEnvironmentVariable envVar

Parameters:
    envVar : string - The environment variable to use

Returns: Vault

Read a vault from an environment variable.

envVar : string

The environment variable to use

Returns: Vault

Vault.fromEnvironmentVariableOrNone envVar

Full Usage: Vault.fromEnvironmentVariableOrNone envVar

Parameters:
    envVar : string - The environment variable to use

Returns: Vault option

Read a vault from an environment variable or return None

envVar : string

The environment variable to use

Returns: Vault option

Vault.fromFakeEnvironmentOrNone ()

Full Usage: Vault.fromFakeEnvironmentOrNone ()

Parameters:
    () : unit

Returns: Vault option

Read a vault from FAKE_VAULT_VARIABLES

() : unit
Returns: Vault option

Vault.fromFakeEnvironmentVariable ()

Full Usage: Vault.fromFakeEnvironmentVariable ()

Parameters:
    () : unit

Returns: Vault

Read a vault from FAKE_VAULT_VARIABLES

() : unit
Returns: Vault

Vault.fromJson str

Full Usage: Vault.fromJson str

Parameters:
    str : string - The JSON string of the vault to read

Returns: Vault

Read in a vault from a given json string, make sure to delete the source of the json after using this API

str : string

The JSON string of the vault to read

Returns: Vault

Vault.get name v

Full Usage: Vault.get name v

Parameters:
    name : string
    v : Vault

Returns: string

similar to tryGet but throws an exception if the variable with the given name is not available in the vault The variable name to retrieve The vault to check

name : string
v : Vault
Returns: string

Vault.tryGet name v

Full Usage: Vault.tryGet name v

Parameters:
    name : string - The variable name to retrieve
    v : Vault - The vault to check

Returns: string option

Try to retrieve the variable with the given name from the vault (decrypts the variable if needed)

name : string

The variable name to retrieve

v : Vault

The vault to check

Returns: string option