Back to Materialize

mz secret

doc/user/content/integrations/cli/reference/secret.md

1231.4 KB
Original Source

The mz secret command manages secrets in a region.

create

Create a new secret.

shell
mz secret create <NAME> [options...]

The secret's value is read from the standard input stream.

By default, the command returns an error if a secret with the provided name already exists. Pass --force to instead update the existing secret with the new value, if it exists.

{{< note >}} Using this command is preferred to executing CREATE SECRET directly, as it avoids leaving the secret's value in your shell history. {{< /note >}}

Arguments

FlagEnvironment variablesDescription
<NAME>Required. The name of the secret.
--database=<DATABASE>The database in which to create the secret.
Default: materialize.
--schema=<SCHEMA>The schema in which to create the secret.
Default: the first schema in the user's default search_path.
--forceOverwrite the existing value of the secret, if it exists.
--profile=<PROFILE>MZ_PROFILEUse the specified authentication profile.

Global arguments

{{% cli-global-args %}}