Testing in production validates software or infrastructure against production data and systems under controlled conditions. For infrastructure as code, it can expose broken systems without maintaining a separate testing environment. section 12.3.4
A controlled infrastructure test can proceed as follows:
- Stage a second set of resources containing the intended changes. section 12.3.4
- Hide the changes behind a feature flag, then direct application and user traffic to them. section 12.3.4
- Verify functionality while both resource sets run simultaneously, then remove the old resources after the observation period. section 12.3.4
Conference video service
A video service team tests infrastructure changes with blue-green resources and a feature flag, avoiding a separate testing environment while controlling exposure. section 12.3.4
Figure 12.15 Testing in production for IaC applies blue-green deployments and feature flagging for a set of resources.
Shows how blue-green deployments and feature flagging control production exposure for infrastructure changes. section 12.3.4
