Which of the following is a key principle of the 12-factor app methodology related to managing configuration?
Twelve-factor apps separate configuration from code, storing it in environment variables so the same build deploys unchanged across environments. This satisfies the stem's constraint of managing configuration without hardcoding values or committing environment-specific settings into the codebase.
Why this answer
The 12-factor app methodology's third factor, 'Config,' states that configuration should be stored in the environment (environment variables), not in the code. This separates config from code, allowing the same build to be deployed across environments (dev, staging, prod) without modification. Environment variables are language-agnostic and easily changed per deployment.
Exam trap
KCNA often tests the 12-factor 'Config' factor, catching candidates who confuse environment variables with config files or build-time embedding, missing the core principle of separating config from code for portability.
How to eliminate wrong answers
Option A is wrong because storing configuration in application code violates the 12-factor principle of separating config from code; it makes the build environment-specific and requires code changes to alter config. Option C is wrong because embedding configuration in the build process ties config to a specific build artifact, preventing the same artifact from being promoted across environments — the opposite of the 12-factor goal. Option D is wrong because a configuration file in the application directory is still part of the codebase and is not environment-agnostic; it can be accidentally committed and does not support per-environment overrides as cleanly as environment variables.