Storing config in environment variables is the cleanest for keeping code and config separate. A here, per best practice like Twelve-Factor App. Pretty sure that's what Cisco is after.
Q: 8
Application sometimes store configuration as constants in the code, which is a violation of strict
separation of configuration from code. Where should application configuration be stored?
Options
Discussion
Option A YAML files are common but they still get stored with code sometimes, A is stricter separation.
Had something like this in a mock, it's A. Environment variables are the usual way for strict config separation, not config files.
A tbh, environment variables are recommended specifically for keeping config out of code repos. YAML or INI files can end up in version control with the app, so not as strict. Pretty sure that's what Cisco's after here.
A
A is right, config in environment variables keeps it separate from the code so you can promote builds without code changes. YAML or INI files still tend to get checked in with the app and aren’t true separation. I think Cisco wants the strictest method, so A makes sense here. Could see why some might pick B though.
My vote is B, since YAML files are a common config format but trap is they're still bundled with code sometimes.
I don't think B or E work here, since config files like YAML or INI still travel with the codebase and aren't true separation. A, environment variables, is the best way since it keeps config fully outside the app. Pretty sure that's what they want, but open to other takes.
I’d say A, since environment variables are standard for config separation. That's what Twelve-Factor App recommends and I've seen it pop up in similar exam questions. B or E are fine for human-readable configs but not strict separation. Anyone disagree with A?
A is right
Be respectful. No spam.
Question 8 of 35