Utilities
Utilities provide an easy mechanism for calling functions from makes without having to specify them on any file.
makeNodeJsLock
You can generate a package-lock.json
for
makeNodeJsEnvironment
like this:
- Supported
node_js_version
s are:18
,20
and21
. package_json_dir
is the absolute path to the directory that contains thepackage.json
file in your project.- The
package-lock.json
file will be generated in the same directory that contains thepackage.json
file. - The
lockfile_version
is an optional argument, defaults to2
and can be1
or2
.
makePythonLock
You can generate a poetry.lock
for
makePythonEnvironment
like this:
- Supported
python_version
s are3.9
,3.10
,3.11
and3.12
-
project
is the absolute path to a Python project containing apyproject.toml
file. Example:
makeRubyLock
You can generate a sourcesYaml
for
makeRubyGemsEnvironment
like this:
- Supported
ruby_version
s are:3.1
,3.2
and3.3
. -
dependencies_yaml
is the absolute path to a YAML file mapping RubyGems gems to version constraints. Example: -
sources_yaml
is the absolute path to a file were the script will output results.
makeSopsEncryptedFile
You can generate an encrypted Sops file like this:
kms_key_arn
is the arn of the key you will use for encrypting the file.output
is the path for your resulting encrypted file.
workspaceForTerraformFromEnv
Sets a Terraform Workspace specified via environment variable.
Types:
- workspaceForTerraformFromEnv:
- modules (
attrsOf moduleType
): Optional. Terraform modules to switch workspace. Defaults to{ }
.
- modules (
- moduleType (
submodule
):- setup (
listOf package
): Optional. Makes Environment or Makes Secrets tosource
(as in Bash'ssource
) before anything else. Defaults to[ ]
. - src (
str
): Path to the Terraform module. - variable (
str
): Optional. Name of the environment variable that contains the name of the workspace you want to use. Defaults to""
. When""
provided, workspace isdefault
. - version (
enum [ "0.14" "0.15" "1.0" ]
): Terraform version your module is built with.
- setup (
Example: