You need to deploy infrastructure and application in one pipeline but with separate approvals.
IntermediateScenarioCI/CD and IaC
Answer
Situation read → Separate stages, environments and identities.
What I'd do →
- Stage
infra-plan(Reader identity), output plan artifact - Stage
infra-applytargeting environmentinfra-prodwith platform team approval (Contributor identity) - Stage
app-deploytargeting environmentshop-prodwith app team approval (namespace-scoped identity) - Skip
infra-applywhen the plan has no changes (set an output variable fromterraform plan -detailed-exitcode)
Why → Different owners approve different risks, and each stage has only the rights it needs.
Interview tip → Conditional infra stages keep pipelines fast.
More on CI/CD and IaC
Design a GitHub Actions pipeline that builds an image, pushes to ACR and deploys to AKS with no secrets.IntermediateYour organisation uses Azure DevOps. Set up a secure deployment pipeline to AKS.IntermediateYou need to promote the same image from dev to staging to prod. How do you design it?IntermediateTerraform state for prod is in a storage account accessible with account keys. Harden it.IntermediateYour team wants to move from ARM JSON templates to Bicep. How do you migrate?BeginnerA pipeline needs to deploy to dev, test and prod in different subscriptions. How do you handle identities?Advanced