You must run Terraform against a private AKS cluster and private Key Vault from CI.
AdvancedScenarioCI/CD and IaC
Answer
Situation read → Hosted runners can't reach private endpoints. Need private runners.
What I'd do →
- Self-hosted runners/agents in a VNet with line of sight (Managed DevOps Pools for Azure DevOps, or GitHub-hosted runners with Azure private networking, or self-hosted runners on VMSS/ACA jobs)
- DNS resolution of privatelink zones from that VNet
- Same OIDC identities; no change to auth
- For one-off kubectl,
az aks command invokefrom hosted runners
Why → Private endpoints mean network access is required in addition to identity.
Interview tip → Mention GitHub's Azure private networking for hosted runners; few candidates know it.
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