Secrets and Configuration in Cloud Deployments

Summary

This note explains the difference between ordinary configuration and sensitive secrets in cloud deployments. The goal is to make deployment design safer by separating what can be exposed publicly from what must be protected and controlled.

Why this matters

  • many early cloud mistakes happen because secrets are treated like normal config values
  • deployment pipelines become risky when credentials are copied between local machines, repos, and portals
  • safer configuration habits make troubleshooting easier because the access path is clearer

Environment / Scope

ItemValue
Topicconfiguration and secret handling
Best use for this noteunderstanding what should and should not be stored in deployment config
Main focusapp config, secrets, environment variables, secret stores
Safe to practise?yes

Core distinction

TypeWhat it isTypical example
Configurationnon-sensitive values that define behaviourregion, feature flag, API base URL
Secretsensitive value that grants access or should stay privateAPI key, database password, client secret

Mental model

Think about deployment inputs like this:

normal config
-> shapes behaviour
 
secret
-> protects access

The key question is not only “does the app need this value?” but also “what happens if this value is exposed?”

Everyday examples

SituationBetter handling model
app needs to know which region to usenormal configuration
function needs a storage key or client secretsecret store or managed identity path
CI pipeline needs deployment credentialsprotected pipeline secret or workload identity
app has different values in dev and prodenvironment-specific config, with secrets separated from plain settings

Common misunderstandings

MisunderstandingBetter explanation
”If it is in an environment variable, it is automatically safe”env vars are only a delivery mechanism, not a security model
”Config files are fine if the repo is private”secrets still spread too easily through history and reuse
”One secret for every environment is simpler”separation is safer and makes incidents easier to contain
”Local testing secrets can be reused in CI”local and pipeline trust boundaries are different

Practical checks

Before finalising a deployment, ask:

  1. which values are plain config and which are secrets?
  2. where are secrets stored?
  3. who or what can read them?
  4. can managed identity or role-based access replace stored credentials?
  5. are dev, lab, and production values separated clearly?

Good habits

  • keep secrets out of normal markdown notes, repos, and screenshots
  • separate config review from secret review
  • prefer secret stores or workload identity over copied credentials
  • keep environment names and scopes clear
  • document the access model without exposing the secret itself

Key takeaways

  • configuration and secrets are related but should not be treated the same way
  • safer deployments come from separating behaviour settings from access-sensitive values
  • identity design, secret handling, and deployment workflow all affect each other