Appearance
metaplay secrets create ENVIRONMENT NAME [flags]
Create a user secret in the target environment
Appearance
Create a user secret in the target environment
metaplay secrets create ENVIRONMENT NAME [flags] Create a user secret in the target environment with the given name and payload.
Secret name must start with 'user-'. This avoids conflicts with other secrets.
Each secret consists of multiple entries, with each entry being a key-value pair. Use the --from-literal and --from-file flags to provide the key-value pairs. Multiple key-value pairs can be specified with any combination of the flag. All the keys must be unique within a single secret.
By default, the command fails if the secret already exists. Use the --overwrite flag to replace an existing secret with the new values. This is useful for scripting and automation scenarios where you want to ensure a secret has specific values regardless of whether it already exists.
The game server supports a special syntax 'kube-secret://<secretName>#<secretKey>' to access Kubernetes secrets in the various runtime options, configurable from the Options.*.yaml files.
Expected arguments:
Related commands:
# Accessible with URLs 'kube-secret://user-mysecret#username' and 'kube-secret://user-mysecret#password'
metaplay secrets create nimbly user-mysecret --from-literal=username=foobar --from-literal=password=tops3cret
# Accessible with URL 'kube-secret://user-mysecret#credentials'
metaplay secrets create nimbly user-mysecret --from-file=credentials=../../credentials-dev.json
# Create or replace a secret (useful for scripting)
metaplay secrets create nimbly user-mysecret --from-literal=apikey=secret123 --overwrite--from-file <stringArray>: Provide a key-value pair entry with the value read from a file (e.g., secret=../secret.txt) (default: [])--from-literal <stringArray>: Provide a key-value pair entry using the literal value (e.g., username=foobar) (default: [])--overwrite: Overwrite the secret if it already exists--color <string>: Should the output be colored (yes/no/auto)? [env: METAPLAYCLI_COLOR] (default: auto)--project <string>: Path to the to project directory (where metaplay-project.yaml is located)--skip-version-check: Skip the check for a new CLI version being available--verbose: Enable verbose logging, useful for troubleshooting [env: METAPLAYCLI_VERBOSE]