nerdexam
Adobe

AD0-E724 · Question #21

A developer needs to store a sensitive API key for a third-party integration that will be used in a production environment. To maintain security, this key should not be stored in the Git repository. W

The correct answer is B. 'magento-cloud variable:set <name> <value>'. Option B is correct because magento-cloud variable:set is the actual CLI subcommand used to store environment variables in Adobe Commerce Cloud (Magento Cloud), and it supports a --sensitive flag that hides the value from the UI and logs - making it the proper tool for secrets li

Setup and Configuration

Question

A developer needs to store a sensitive API key for a third-party integration that will be used in a production environment. To maintain security, this key should not be stored in the Git repository. What is the recommended 'magento-cloud' CLI command to securely store this value for a specific environment?

Options

  • A'magento-cloud credential:set <name> <value>'
  • B'magento-cloud variable:set <name> <value>'
  • C'magento-cloud secure:add <name> <value>'
  • D'magento-cloud env:config:set api_key <value>'

How the community answered

(26 responses)
  • A
    12% (3)
  • B
    77% (20)
  • C
    4% (1)
  • D
    8% (2)

Explanation

Option B is correct because magento-cloud variable:set is the actual CLI subcommand used to store environment variables in Adobe Commerce Cloud (Magento Cloud), and it supports a --sensitive flag that hides the value from the UI and logs - making it the proper tool for secrets like API keys that must stay out of version control. Options A (credential:set) and C (secure:add) are entirely fabricated subcommands that do not exist in the magento-cloud CLI toolset. Option D (env:config:set) is also invented and follows neither the CLI's naming conventions nor its actual command structure - the real CLI uses variable:* for this purpose, not env:config:*.

Memory tip: Think "variables hold values" - the variable:set command is the generic, real-world tool for injecting configuration into a cloud environment, and the --sensitive flag is how you tell it to treat the value as a secret.

Topics

#environment variables#magento-cloud CLI#API key security#sensitive credentials

Community Discussion

No community discussion yet for this question.

Full AD0-E724 Practice