Skip to main content

Module config

Module config 

Source
Expand description

Configuration loading for profiles and project settings.

Loads connection profiles from profiles.toml (resolved via --profiles-dir, MZ_DEPLOY_PROFILES_DIR, or ~/.mz/ default) and project settings from project.toml. Key types:

  • Profile — Resolved connection details (host, port, credentials).
  • ProfilesConfig — All profiles loaded from a single profiles.toml.
  • ProjectSettings — Per-project config: active profile name, optional Materialize version / Docker image override, and an optional dependencies array of fully qualified database.schema.object names that this project reads from but does not own.

Passwords can be pulled from the environment via an inline ${VAR} in the password field, or via MZ_PROFILE_<NAME>_PASSWORD (see ProfilesConfig::expand_env_vars for details).

Structs§

Profile
Resolved connection details for a Materialize region.
ProfileConfig
Per-profile configuration from project.toml.
ProfilesConfig
All connection profiles loaded from a profiles.toml file.
ProjectSettings
Parsed contents of project.toml.
SecurityConfig
Security-related settings for a profile (e.g., AWS credentials for secret resolution).
Settings
Resolved settings for an mz-deploy execution.

Enums§

ConfigError
Errors that can occur when loading or resolving configuration from profiles.toml and project.toml.
SslMode
TLS mode selection for a profile, matching libpq’s sslmode vocabulary

Constants§

EMULATOR_PROFILE_NAME
Name of the built-in profile that targets a local Materialize emulator.
MZPROFILE_FILENAME
Filename of the per-project default-profile pointer.

Functions§

default_docker_image
The Docker image used when no mz_version is configured.
read_mzprofile
Read the default profile name from <project_directory>/.mzprofile.
write_mzprofile
Write profile_name to <project_directory>/.mzprofile, replacing any existing content.