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 singleprofiles.toml.ProjectSettingsβ Per-project config: active profile name, optional Materialize version / Docker image override, and an optionaldependenciesarray of fully qualifieddatabase.schema.objectnames 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.
- Profile
Config - Per-profile configuration from
project.toml. - Profile
Data π - Profiles
Config - All connection profiles loaded from a
profiles.tomlfile. - Project
Settings - Parsed contents of
project.toml. - Security
Config - Security-related settings for a profile (e.g., AWS credentials for secret resolution).
- Settings
- Resolved settings for an mz-deploy execution.
EnumsΒ§
- Config
Error - Errors that can occur when loading or resolving configuration from
profiles.tomlandproject.toml. - SslMode
- TLS mode selection for a profile, matching libpqβs
sslmodevocabulary
ConstantsΒ§
- DOCKER_
IMAGE_ πBASE - Repository path for the Materialize Docker image, without a tag.
- 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_versionis configured. - default_
port π - emulator_
profile π - The built-in connection profile for the local Materialize emulator.
- is_
valid_ πoption_ key - Check whether
keyis a valid identifier for a profile[options]entry. - read_
mzprofile - Read the default profile name from
<project_directory>/.mzprofile. - sanitize_
profile_ πfor_ env - Uppercase a profile name and replace any non-alphanumeric character with
_so it can be embedded in a shell-legal env var identifier likeMZ_PROFILE_MY_PROD_PASSWORD. - write_
mzprofile - Write
profile_nameto<project_directory>/.mzprofile, replacing any existing content.