Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadEnvFile ¶
LoadEnvFile reads a .env file from the specified file path and returns a map of environment variables. The .env file should have lines in the format KEY=VALUE. Lines that are empty or start with a '#' are ignored. If a line does not contain an '=' character, an error is returned.
Parameters:
- filePath: The path to the .env file to be read.
Returns:
- A map where the keys are environment variable names and the values are the corresponding values.
- An error if the file cannot be opened, read, or contains invalid lines.
func UpdateSecretsFromEnvFile ¶
UpdateSecretsFromEnvFile updates secrets in a specified secret manager from a .env file. It loads environment variables from the given file and updates each key-value pair in the secret manager.
Parameters:
- secretname: The name of the secret to update.
- region: The region where the secret is stored.
- filePath: The path to the .env file containing the environment variables.
Returns:
- error: An error if the .env file cannot be loaded or if any secret update fails.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.