Set up CI/CD and infrastructure as code
CI/CD pipelines and IaC templates with environments, checks, and rollback.
The prompt
Role: Act as a DevOps / SRE engineer provisioning a service the standard way.
Context: Service and its requirements (compute, storage, networking, scaling, availability): [REQUIREMENTS]. Cloud / platform and IaC tool: [PLATFORM_TOOL]. Existing modules / standards to reuse: [STANDARDS]. Security and compliance requirements (network, secrets, IAM, logging): [SECURITY_REQS]. Environments: [ENVIRONMENTS]. Deployment strategy: [DEPLOY_STRATEGY].
Task: Produce: (1) the IaC for the service using existing modules/standards where possible, parameterised per environment, with secrets and IAM handled per policy; (2) a CI/CD pipeline outline - stages, quality/security gates, approvals, deployment strategy, health checks, and rollback; (3) the observability wiring (metrics, logs, alerts) that should ship with it.
Format: Sections: IaC (code, per resource) | Pipeline outline (stages + gates) | Observability. Code in fenced blocks.
Verification: Do not hardcode secrets or account IDs - use variables/parameters and note where values come from. Flag anything that deviates from the stated standards or security requirements.
Validation: Walk a deploy and a failed deploy through the pipeline: does the rollback actually restore service, and do the gates catch a bad build? Fix the weak point.
Highlighted [brackets] are blanks to replace with your own details.
Fill in the blanks and use this promptMore Software Development prompts
What to fill in
- REQUIREMENTS
- PLATFORM_TOOL
- STANDARDS
- SECURITY_REQS
- ENVIRONMENTS
- DEPLOY_STRATEGY
How this prompt is built
This prompt follows the RCTFVV structure (Role, Context, Task, Format, Verification, Validation). RCTFVV extends RCTF with two checking steps. Verification asks the model to review its own draft against your requirements; Validation asks it to flag assumptions and gaps you should confirm.
Related prompts
- Implement a feature from a spec, with testsPlans and writes production-quality code for a feature, including tests and edge cases.
- Plan a major framework or dependency upgradeBuilds an incremental upgrade path for a framework, language, or library version, with breaking changes mapped to your codebase.
- Respond to a secret leaked in a code repositoryWalks you through containing a leaked API key, password, or token: revoke, rotate, check for misuse, and clean up history.
- Debug an error and find the root causeReproduces, isolates, and fixes a bug — with a test to prevent it coming back.