dcloud deploy docdb bind

Bind a Document Database cluster (MongoDB-compatible) as one of its users

IAM deploy:ManageBrokerBindingChanges stateAsks before it deletes (-y skips)

Generates {prefix}MONGODB_URL (mongodb://user:password@<host>:27017/?tls=true&authMechanism=SCRAM-SHA-256&authSource=admin&directConnection=true&tlsCAFile=<the platform CA in the container>) at every rollout, and on a 3-node cluster {prefix}MONGODB_READER_URL (the same on port 27018: the replicas, reads only, may lag). A private cluster needs the app’s machines in its VPC; a public one is reachable from anywhere. Needs secrets:GetSecretValue on that user’s password. Saving does not restart the app. Pass redeploy: true to roll the live deployment’s own source onto the new configuration (also needs deploy:DeployApp); otherwise the response and GET …/env report pending until someone redeploys.

Synopsis

dcloud deploy docdb bind id --cluster-id clusterId --user-name userName [flags]

Arguments

  • <id>Required

    string

    Also accepted as --id. Constraints: uuid

Flags

  • --cluster-idRequired

    string

    The Document Database cluster to bind

    Constraints: /^ewdoc-[0-9a-f]{12}$/

  • --user-nameRequired

    string

    The user the app signs in as: the cluster’s master user (masterUsername) or one of its users

  • --env-prefixOptional

    string

    Put in front of every generated variable name (e.g. CACHE_ gives CACHE_REDIS_URL), so one app can hold several bindings of a kind; default empty

    Constraints: max 32 chars, /^([A-Z][A-Z0-9_]*_)?$/

  • --redeployOptional

    boolean (--redeploy / --no-redeploy)

    Also roll the live deployment onto the new configuration; default false

Example

dcloud deploy docdb bind id --cluster-id example --user-name example

Generated from the API description, the same one the API checks requests against and the CLI is built from.