What should you focus on for your Terraform interview?

Can you explain state beyond its definition?

“What is a Terraform state file?” was the most asked question, appearing in 7 of 41 interviews. Start there, then check whether you can answer the other state questions:

  • Can you explain state files, remote backends, and locking?
  • How would you handle concurrent runs and keep environments separate?
  • What would you do if state were lost or corrupt?

Can you explain when to choose Terraform?

Related tools came up in 13 of 41 interviews, and Terraform basics appeared in 11 of 41 interviews. Cover both what Terraform does and when you would choose it over another tool or a manual change.

  • Can you explain infrastructure as code and when you would use it?
  • When would you manage AWS infrastructure through the console instead of Terraform?
  • How would you compare Terraform with CloudFormation, Bicep, or Ansible?
  • Can you describe how you would set up Ansible and organize its playbooks?

Can you walk through a change and handle a failure?

Questions covered basic commands, imports, manual changes, drift, and failed deployments. Can you explain where each Terraform command fits in your workflow? Then walk through how you would import a manually created resource and handle later changes made outside Terraform.

For CI/CD, can you explain where terraform plan and terraform apply belong? Describe where approval is needed, how changes move between environments, and how you would handle a failed deployment.

Can you describe a reusable setup?

Module questions covered inputs, resources, and CI/CD integration. Can you describe those parts of a reusable module? Then explain how you would organize the project so it stays easy to maintain.

Environment questions also covered sharing configuration. Can you explain how you would manage configuration across environments with Terraform and Terragrunt?

Can you explain cloud tasks and security choices?

For cloud deployment questions, can you describe how you would package and deploy Lambda, manage database backups, or make network changes with Terraform?

For security questions, check whether you can explain how you would handle secrets and control execution permissions. Can you also describe encryption, secure resource settings, and compliance checks? Review where CyberArk and Prisma Cloud fit into the setup.

Who gets asked Terraform

DevOps engineer19 interviews
Cloud engineer9 interviews
Data engineer3 interviews
SRE2 interviews
Network engineer2 interviews
Backend developer2 interviews

The 20 most asked Terraform questions

Counted by interview, not by mention: a question asked twice in one conversation counts once.

  1. What is a Terraform state file?

    Asked in 7 of 41 interviews · last asked Oct 20 · Concept · Junior

    Show answer

    A Terraform state file is a JSON file that links resources in your configuration to real infrastructure and stores their last known attributes. Terraform uses it with your configuration and provider data to plan changes. For team use, store state in a secure remote backend with locking support, and keep it out of Git because it can contain secrets.

    • State tracks resources Terraform manages; it is not the configuration itself.
    • The default local state file is named terraform.tfstate.
    • Remote state lets a team share state; locking prevents simultaneous writes when supported.
    • Protect state with access controls, encryption, and backups; avoid editing it by hand.

    What the interviewer checks: The interviewer checks whether you understand how Terraform tracks resources and how to store state safely.

    Other ways it was asked
    • “What is the state file in Terraform?”
    • “What is a Terraform state file and why is it important?”
    • “How do you manage Terraform state files?”
  2. What is Terraform, and how do you use it to manage infrastructure?

    Asked in 4 of 41 interviews · last asked Sep 30 · Concept · Junior

    Show answer

    Terraform is an infrastructure as code tool that creates and manages resources from configuration files. I describe the infrastructure I want, run `terraform init`, review `terraform plan`, and run `terraform apply`. Terraform uses providers to call service APIs and state to track managed resources.

    • Configuration describes the desired infrastructure, rather than step-by-step commands.
    • Providers let Terraform manage cloud services and other platforms.
    • Review plans before applying: changes can create, update, replace, or delete resources.
    • Keep configuration in version control and store state securely; state can contain sensitive data.

    What the interviewer checks: The interviewer checks whether you understand infrastructure as code and Terraform’s basic workflow, providers, and state.

    Other ways it was asked
    • “What is Terraform, and how does it work?”
    • “What is Terraform, and what is it used for?”
    • “What is Terraform, and why do you use it?”
  3. What is infrastructure as code, and when would you use it?

    Asked in 3 of 41 interviews · last asked Jul 28 · Concept · Mid-level

    Show answer

    Infrastructure as code (IaC) means defining and managing infrastructure in code files instead of setting it up manually. Tools such as Terraform use these files to create or update servers, networks, and other resources. I would use it for repeatable environments, tracking and reviewing changes, and reducing manual setup errors in cloud or on-premises systems.

    • Store infrastructure code in version control so changes can be tracked and reviewed.
    • Reuse definitions to create consistent development, test, and production environments.
    • Terraform describes the desired infrastructure and plans changes before applying them.
    • Automation reduces manual work, but incorrect code can still cause outages.

    What the interviewer checks: The interviewer is checking whether you understand IaC and when it is more useful than manual setup.

    Other ways it was asked
    • “What is infrastructure as code, and when would you use it to manage cloud infrastructure?”
    • “What is infrastructure as code, and how is it used to provision infrastructure?”
    • “Could you explain infrastructure as code (IaC) to someone familiar with IT but not necessarily with cloud, as if you were writing a brief explanation for a project manager?”
  4. What are the basic Terraform commands, and how do they fit into the Terraform workflow?

    Asked in 3 of 41 interviews · last asked Sep 16 · Concept · Junior

    Show answer

    The basic Terraform workflow is to write configuration, run `terraform init`, check it with `terraform fmt` and `terraform validate`, then run `terraform plan` and `terraform apply`. `plan` previews changes; `apply` makes them and updates state. Use `terraform state` subcommands to inspect or manage tracked resources, and `terraform destroy` to remove managed infrastructure.

    • `init` sets up the backend and downloads required providers and modules.
    • `fmt` formats code; `validate` checks configuration but does not verify live infrastructure.
    • Review the plan before applying; a saved plan lets you apply exactly the reviewed changes.
    • State links configuration to real resources; state commands are tools, not a required workflow step.

    What the interviewer checks: The interviewer checks whether you know the command order, review changes before applying, and understand state.

    Other ways it was asked
    • “What does the Terraform workflow look like, and what are the different steps?”
    • “Can you walk me through the Terraform init, plan, apply, and state workflow?”
    • “What are the basic commands you have used within Terraform?”
  5. When would you manage AWS infrastructure through the console instead of Terraform?

    Asked in 2 of 41 interviews · last asked Oct 15 · Tooling · Mid-level

    Show answer

    I use the AWS console for quick experiments, troubleshooting, or urgent changes when the normal deployment process is too slow. I use Terraform for lasting infrastructure that needs repeatable setup, code review, and change tracking. If I change a Terraform-managed resource in the console, I update the code or undo the manual change to avoid drift.

    • Use the console for temporary tests or features the Terraform provider does not yet support.
    • Use Terraform for shared environments and repeatable, reviewed changes.
    • Console changes can cause drift, and later Terraform runs may overwrite them.
    • After emergency changes, reconcile the configuration and check the Terraform plan.

    What the interviewer checks: The interviewer checks whether you balance speed with reliable changes and understand configuration drift.

    Other ways it was asked
    • “When configuring AWS, when would you use the console, and when would you use an infrastructure-as-code tool such as Terraform?”
    • “How do you manage infrastructure changes with Terraform or the AWS console, and what factors determine which approach you use?”
  6. How would you set up an Ansible environment and organize and manage playbooks?

    Asked in 2 of 41 interviews · last asked Jul 30 · Tooling · Mid-level

    Show answer

    I install Ansible in a Python virtual environment and configure inventory, host access, and privilege escalation where needed. I keep playbooks in Git, separate inventories by environment, and use roles for reusable tasks. I encrypt secrets with Ansible Vault and test changes before running them in production.

    • Keep playbooks small; organize roles into tasks, handlers, templates, files, defaults, and vars.
    • Use group_vars and host_vars for inventory variables; keep Vault passwords outside Git.
    • Pin Ansible and dependency versions; track external roles and collections in requirements.yml.
    • Write idempotent tasks; run syntax checks and staging tests. Check mode cannot predict every change.

    What the interviewer checks: The interviewer checks whether you can build a repeatable setup and keep automation reusable, secure, and easy to maintain.

    Other ways it was asked
    • “How do you structure Ansible roles and playbooks?”
  7. What are the benefits of using Terraform, and why not just use CloudFormation?

    Asked in 2 of 41 interviews · last asked Aug 31 · Concept · Mid-level

    Show answer

    Terraform gives me one workflow across AWS, other clouds, and services such as GitHub. I can review plans and reuse modules. For AWS-only projects, CloudFormation is also a good choice because AWS manages its state and execution. I choose based on the services involved, team skills, and existing tools.

    • Terraform supports many providers, but moving between clouds still requires changing resource definitions.
    • Terraform state needs secure storage and locking; CloudFormation manages stack state for you.
    • Both offer change previews: Terraform plans and CloudFormation change sets.
    • CloudFormation integrates closely with AWS; resource support can differ between the two tools.

    What the interviewer checks: The interviewer wants to see a practical comparison, not a claim that one tool is always better.

    Other ways it was asked
    • “Between Terraform and CloudFormation, which do you prefer for AWS, and why?”
  8. How would you design a reusable Terraform module with inputs, resources, and CI/CD integration?

    Asked in 2 of 41 interviews · last asked Sep 4 · Tooling · Mid-level

    Show answer

    I would build a module for one clear task, with related resources, typed inputs, validation, and useful outputs. I would use safe defaults and document required inputs. Callers would pin a module version and pass environment settings. CI/CD would check formatting, validate, test, and create a plan, then apply that saved plan after approval.

    • Keep resource choices inside the module; expose inputs callers need to change and outputs they need to use.
    • Pass provider configurations from the root module rather than defining them inside the reusable module.
    • Use remote state with access controls and supported locking; keep separate state for each environment.
    • Use short-lived CI credentials, protect saved plans, and never commit secrets or state files.

    What the interviewer checks: The interviewer is checking whether you can define a reusable module interface and deploy changes safely through CI/CD.

    Other ways it was asked
    • “How would you design a Terraform module, including the resources it provisions, its input variables, and its integration into a CI/CD pipeline?”
    • “How would you build a reusable Terraform module for creating infrastructure?”
  9. How would you import manually created cloud resources into Terraform?

    Asked in 2 of 41 interviews · last asked Sep 10 · Scenario · Senior

    Show answer

    I would configure the provider and write a resource block matching the existing cloud resource. Then I would import it using its provider-specific ID, with either `terraform import` or an `import` block. Finally, I would run `terraform plan` and adjust the configuration until it shows no unintended changes.

    • `terraform import` links an existing resource to a Terraform address in state; it does not generate configuration.
    • `import` blocks require Terraform 1.5 or later and support reviewing imports through plan before apply.
    • Import IDs depend on the resource type; check the provider documentation.
    • Back up existing state and avoid managing the same resource from multiple Terraform addresses or states.

    What the interviewer checks: The interviewer checks whether you can bring existing resources under Terraform management without replacing or unexpectedly changing them.

    Other ways it was asked
    • “How would you import manually created AWS resources into Terraform?”
    • “In an environment where some Azure resources were created manually in the portal, how would you onboard them to Terraform?”
  10. Where should terraform apply run in a CI/CD pipeline?

    Asked in 2 of 41 interviews · last asked Oct 20 · Tooling · Mid-level

    Show answer

    Run terraform apply in a protected deployment stage after checks and review of the Terraform plan. Apply the saved plan from the same commit, not a new plan. For production, usually require approval and restrict who can run this stage.

    • Run formatting checks, validation, and planning before apply.
    • Keep deployment credentials out of untrusted pull request jobs.
    • Use remote state with locking support and prevent overlapping applies to the same state.
    • Protect saved plan files because they can contain sensitive values.

    What the interviewer checks: The interviewer is checking whether you can separate review from deployment and protect credentials and state.

    Other ways it was asked
    • “How would you design a CI pipeline to run Terraform?”
  11. What kinds of infrastructure resources can you create using Terraform providers?

    Asked once · last asked Apr 14 · Tooling · Mid-level

    Show answer

    Terraform providers let you create and manage resources such as virtual machines, networks, storage, databases, and Kubernetes objects. They can also manage DNS records, monitoring alerts, and user permissions. The available resources depend on what each provider supports.

    • Cloud providers support resources such as servers, networks, and managed databases.
    • Other providers manage Kubernetes, DNS, monitoring, and software services.
    • A provider must support the resource you want to manage.

    What the interviewer checks: The interviewer is checking whether you understand that providers let Terraform manage many kinds of resources, not just servers.

  12. How has the shift to Infrastructure as Code influenced how organizations manage resources and operations?

    Asked once · last asked Oct 3 · Concept · Mid-level

    Show answer

    Infrastructure as Code has moved resource management from manual setup to code stored in version control. Teams can review, test, and automate infrastructure changes, making environments more consistent and easier to repeat. Operations teams spend less time on routine setup, but must protect credentials, control access, and check changes before applying them.

    • Version control records changes and supports team review.
    • Automation reduces manual work and configuration errors.
    • Reusable code helps keep environments consistent.
    • Incorrect code can affect many resources, so testing and approval still matter.

    What the interviewer checks: The interviewer is checking whether you understand how IaC changes daily operations, teamwork, and risk management.

  13. When is it appropriate to use the open-source version of Terraform for enterprise projects?

    Asked once · last asked Feb 17 · Scenario · Mid-level

    Show answer

    Terraform CLI is appropriate for enterprise projects when the team can manage collaboration, security, and automation itself. It works when built-in governance and vendor support are not required. Check the license: Terraform 1.5.7 and earlier are open source; newer releases use the Business Source License and are source-available, not open source.

    • Use secure remote state storage with locking to prevent conflicting changes.
    • Provide access controls, approval workflows, and audit records through your own tools.
    • Compare operating costs with the managed features of HCP Terraform or Terraform Enterprise.
    • Do not choose an outdated release only for its open-source license.

    What the interviewer checks: The interviewer is checking whether you can weigh enterprise needs, operating effort, and licensing when choosing Terraform.

  14. How would you manage Ansible inventory, including how it is populated and how inventory changes are tracked?

    Asked once · last asked Mar 11 · Tooling · Mid-level

    Show answer

    I would use static inventory files for stable hosts and dynamic inventory plugins for changing cloud hosts. I would group hosts by role and environment, with shared settings in group variables. I would track static inventory and plugin configuration in Git, and track dynamic host changes through the source system’s audit logs.

    • Static inventory lists hosts directly; dynamic plugins read hosts and metadata from an external source.
    • Groups and host or group variables organize connection details and environment settings.
    • Git tracks inventory files and configuration, but not automatically every change in dynamically discovered hosts.
    • Keep secrets encrypted with Ansible Vault or in an external secret store.

    What the interviewer checks: The interviewer is checking how you organize hosts, keep inventory current, and trace changes.

  15. What does idempotence mean in infrastructure configuration tools such as Chef and Puppet?

    Asked once · last asked Aug 30 · Concept · Mid-level

    Show answer

    Idempotence means applying the same configuration repeatedly has the same effect as applying it once. In Chef and Puppet, resources check the current state and make changes only when needed to reach the desired state. If nothing has changed, another run should leave the managed infrastructure unchanged.

    • Repeated runs should not create duplicate resources or repeat unnecessary changes.
    • If the system drifts from the desired state, a later run can correct it.
    • Custom scripts and commands need checks or guards to avoid repeating changes.

    What the interviewer checks: The interviewer is checking whether you understand desired state and why repeated configuration runs should be safe.

    Other ways it was asked
    • “What does it mean for a Chef or Puppet configuration to be idempotent?”
    • “What does idempotence mean in infrastructure configuration?”
  16. When should you use standard Ansible plugins and roles versus writing custom ones?

    Asked once · last asked Sep 3 · Tooling · Mid-level

    Show answer

    Use existing Ansible plugins and roles when they meet your needs and are well maintained. Configure or combine them before writing custom ones. Write custom code when you need behavior or integrations they do not support. Custom code gives more control, but you must test, document, and maintain it.

    • Check compatibility, documentation, security, and maintenance before using community content.
    • Use roles to package reusable tasks, variables, templates, and handlers.
    • Use custom plugins to extend Ansible behavior, such as inventory lookup or filters.
    • Avoid custom code when existing options already solve the problem.

    What the interviewer checks: The interviewer is checking whether you can choose reuse over custom work while understanding roles and plugins.

  17. How does Terraform compare with Azure-native tools like ARM and Bicep, and why choose it?

    Asked once · last asked Sep 10 · Concept · Senior

    Show answer

    Terraform manages infrastructure across Azure and other platforms through providers. ARM templates and Bicep focus on Azure, and Bicep compiles to ARM templates. I would choose Terraform for a shared workflow across platforms or an existing investment in Terraform modules. For Azure-only work, Bicep can be simpler because there is no separate state file to manage.

    • Terraform supports many platforms, but each cloud still needs its own resource definitions.
    • Terraform state needs secure storage and coordination for team use.
    • Bicep uses Azure Resource Manager directly; Terraform resource coverage depends on the provider.
    • Choose based on platform needs, team skills, and existing modules.

    What the interviewer checks: The interviewer checks whether you can explain the trade-offs and justify Terraform without claiming it is always better.

    Other ways it was asked
    • “Why would a company use Terraform even when Azure-native tools like ARM or Bicep are available?”
    • “What are the differences between Terraform and Bicep, and why would you choose Terraform over Bicep?”
  18. What is the difference between Terraform and Ansible?

    Asked once · last asked Oct 7 · Concept · Mid-level

    Show answer

    Terraform mainly creates and manages infrastructure, such as networks and virtual machines. Ansible mainly configures systems and runs tasks, such as installing software. Terraform tracks managed resources in a state file, while Ansible usually checks systems when it runs. Teams often use Terraform to create servers and Ansible to configure them.

    • Terraform uses declarative configuration and plans changes before applying them.
    • Ansible uses playbooks with ordered tasks, often through SSH or WinRM.
    • Terraform stores infrastructure state; Ansible has no equivalent persistent resource state file.
    • Their roles overlap: Ansible can create infrastructure, and Terraform can run configuration scripts.

    What the interviewer checks: The interviewer checks whether you can distinguish infrastructure provisioning from configuration management and explain when to use each tool.

  19. What is the difference between Terraform and Terraform Enterprise?

    Asked once · last asked Oct 20 · Concept · Mid-level

    Show answer

    Terraform is the infrastructure-as-code tool used to define and manage infrastructure. Terraform Enterprise is a paid, self-hosted platform that runs Terraform and adds team workflows, access controls, policy checks, and audit logs. It helps organizations manage Terraform use across many teams.

    • Terraform CLI can run locally or in a CI pipeline.
    • Terraform Enterprise adds shared state management, centralized runs, and governance.
    • Terraform Enterprise is self-hosted; HCP Terraform is HashiCorp’s hosted service.
    • Enterprise requires a license and infrastructure to operate.

    What the interviewer checks: The interviewer is checking whether you can separate the core tool from the platform for team management and governance.

  20. What is the knife tool in Chef?

    Asked once · last asked Oct 22 · Concept · Junior

    Show answer

    Knife is Chef’s command-line tool for managing a Chef Infra Server from a workstation. It can manage nodes, upload cookbooks, and work with roles, environments, and data bags. It can also bootstrap machines to install Chef Infra Client and register them with the server.

    • Knife connects your workstation to Chef Infra Server.
    • It manages server objects such as nodes, cookbooks, roles, environments, and data bags.
    • Bootstrapping prepares a machine to be managed by Chef.
    • Chef Infra Client, not Knife, applies recipes on nodes.

    What the interviewer checks: The interviewer is checking whether you know Knife’s role and how it differs from Chef Infra Client.

Terraform basics interview questions

Start with questions about Terraform, infrastructure as code, providers, supported resources, and when to use code instead of manual changes. 5 questions.

    Compare Terraform with Ansible, CloudFormation, and Bicep, then review Terraform editions and related Ansible, Chef, and Puppet workflows. 13 questions.

    1. Is Terraform a paid tool?

      Asked once · last asked Feb 17 · Concept · Junior

    2. How do you create or modify playbooks for a basic use case?

      Asked once · last asked Sep 4 · Tooling · Mid-level

    3. What is AWS CloudFormation, and what does it do?

      Asked once · last asked Sep 4 · Concept · Junior

    Terraform commands and configuration interview questions

    Review questions about Terraform commands, workflow, data blocks, meta-arguments, null resources, tainted resources, and replacement behavior. 6 questions.

    1. What are meta-arguments in Terraform?

      Asked once · last asked Aug 31 · Concept · Mid-level

    2. If you rename an S3 bucket in Terraform, will Terraform rename the bucket in AWS?

      Asked once · last asked Oct 22 · Concept · Mid-level

    3. What are null resources in Terraform?

      Asked once · last asked Aug 31 · Concept · Mid-level

    4. What are tainted resources in Terraform?

      Asked once · last asked Aug 31 · Concept · Mid-level

    5. What is a data block in Terraform?

      Asked once · last asked Oct 22 · Concept · Junior

    Terraform modules and environments interview questions

    Explore reusable modules, project structure, and ways to share configuration across environments with Terraform and Terragrunt. 5 questions.

    1. How do you structure Terraform projects to keep them maintainable over time?

      Asked once · last asked Apr 14 · Tooling · Mid-level

    2. What are Terraform modules, and why are they useful?

      Asked once · last asked Aug 31 · Concept · Mid-level

    3. How would you manage multiple environments like dev, stage, and prod using the same Terraform code?

      Asked once · last asked Sep 4 · Tooling · Mid-level

    4. How do you organize Terraform and Terragrunt across several environments, and what do you use day to day?

      Asked once · last asked Oct 20 · Tooling · Senior

    Terraform state interview questions

    Check your understanding of state files, remote backends, locking, concurrent runs, environment isolation, and recovery from lost or corrupt state. 9 questions.

    1. What problems can arise with Terraform state files, and how do you resolve them?

      Asked once · last asked May 14 · Scenario · Mid-level

    2. If a Terraform state file is lost but the resources still exist, what happens when you run `terraform plan` or `terraform apply`?

      Asked once · last asked Apr 14 · Scenario · Senior

    3. What is Terraform remote state, and why is state locking important?

      Asked once · last asked Aug 30 · Concept · Mid-level

    4. How do you manage Terraform remote state in AWS?

      Asked once · last asked Aug 31 · Tooling · Mid-level

      Other ways it was asked
      • “How do you manage remote state in AWS?”
    5. What would you do if the Terraform state file was lost or became corrupt?

      Asked once · last asked Oct 15 · Scenario · Mid-level

    6. What happens if two developers try to run terraform apply at the same time?

      Asked once · last asked Oct 20 · Scenario · Senior

    7. Can you give me some commands to unlock the Terraform state file, and what are the best practices for unlocking it?

      Asked once · last asked Oct 20 · Tooling · Senior

    8. What are some best practices for managing Terraform state files across different environments in a CI/CD workflow?

      Asked once · last asked Oct 20 · Tooling · Senior

    Terraform import, drift, and troubleshooting interview questions

    Work through questions about importing existing resources, detecting manual changes, resolving drift, and recovering from failed deployments. 6 questions.

    1. What challenges can arise when managing AWS with Terraform, and how would you resolve them?

      Asked once · last asked May 14 · Behavioral · Mid-level

      Other ways it was asked
      • “What challenges have you encountered managing AWS with Terraform, and how did you resolve them?”
    2. How do you troubleshoot and resolve a difficult Terraform rollout?

      Asked once · last asked May 14 · Scenario · Mid-level

    3. If you created an Azure Service Bus using Terraform and a developer manually added queues and subscriptions, how would you detect those infrastructure changes?

      Asked once · last asked Aug 4 · Scenario · Mid-level

    4. Someone manually changes infrastructure managed by Terraform, and Terraform then shows differences. How would you handle this?

      Asked once · last asked Aug 30 · Scenario · Mid-level

    5. Which Terraform command do you use to detect drift between the actual infrastructure and the configuration?

      Asked once · last asked Aug 4 · Tooling · Junior

    Terraform AWS and Azure deployment interview questions

    Apply Terraform to AWS and Azure questions covering Lambda deployment, database backups, network changes, automation, and infrastructure that can scale. 10 questions.

    1. When would you use Python alongside Terraform for AWS automation rather than using Terraform alone?

      Asked once · last asked Sep 30 · Concept · Mid-level

    2. How would you approach scalability, cost efficiency, and product stability using infrastructure as code?

      Asked once · last asked May 14 · Behavioral · Mid-level

      Other ways it was asked
      • “In environments you have built or managed, how have you approached scalability, cost efficiency, and product stability using infrastructure as code?”
    3. How would you version-control and deploy AWS Lambda function code using infrastructure as code, and which tool would you use?

      Asked once · last asked Aug 5 · Tooling · Mid-level

      Other ways it was asked
      • “Where should AWS Lambda function source code be stored and managed when deploying it with infrastructure as code?”
    4. Is Terraform an appropriate tool for managing and deploying AWS Lambda function code with infrastructure as code?

      Asked once · last asked Aug 5 · Tooling · Mid-level

    5. Can you draw and explain an architecture diagram for deploying an AWS Lambda function using infrastructure as code?

      Asked once · last asked Aug 5 · Design · Mid-level

    6. How would you implement backups for Azure SQL and Cosmos DB using Terraform?

      Asked once · last asked Sep 3 · Tooling · Senior

    7. How do you package AWS Lambda code into a ZIP file using Terraform?

      Asked once · last asked Sep 10 · Tooling · Mid-level

      Other ways it was asked
      • “How would you package AWS Lambda code as a ZIP file when deploying with Terraform?”
      • “What Terraform tools can you use to package code into a ZIP file?”
    8. What is Terraform, and how can you use it to manage network changes such as changing a VLAN ID?

      Asked once · last asked Sep 17 · Tooling · Mid-level

    9. How do you use infrastructure as code, such as AWS CDK or Terraform, to deploy AWS resources?

      Asked once · last asked Sep 21 · Tooling · Mid-level

    10. How do you use AWS cloud data services through the console, command line, and infrastructure as code?

      Asked once · last asked Oct 14 · Tooling · Mid-level

    Terraform CI/CD interview questions

    Consider how to design Terraform pipelines with plan and apply stages, approval gates, environment promotion, and failure handling. 6 questions.

    1. How would you prevent Terraform apply from running without the required approval gates?

      Asked once · last asked Sep 10 · Scenario · Senior

    2. How do you integrate Terraform code into Azure DevOps?

      Asked once · last asked Feb 9 · Tooling · Mid-level

    3. If a GitLab pipeline running Terraform fails midway, what do you do?

      Asked once · last asked Aug 31 · Scenario · Senior

    4. How would you build a CI/CD pipeline with Terraform, CloudFormation, or Ansible? What stages and gates would it include, what would move between stages, and how would it handle failures?

      Asked once · last asked Oct 14 · Design · Senior

    5. How do you promote Terraform code from development to production in a CI/CD workflow?

      Asked once · last asked Oct 20 · Scenario · Senior

    Terraform security interview questions

    Security questions cover secrets, execution permissions, encryption, secure resource settings, compliance checks, and CyberArk and Prisma Cloud integrations. 7 questions.

    1. When infrastructure is deployed using tools such as Terraform, how would CyberArk discover it in the subscription, and would onboarding be user-initiated or automated?

      Asked once · last asked May 8 · Scenario · Senior

    2. How do you handle secrets in Terraform?

      Asked once · last asked Aug 31 · Scenario · Senior

    3. How would you integrate Prisma Cloud into a Terraform CI/CD pipeline?

      Asked once · last asked Sep 2 · Tooling · Senior

    4. What Azure permissions does the identity running Terraform need to add a private link and recreate an Azure Key Vault?

      Asked once · last asked Sep 3 · Tooling · Senior

      Other ways it was asked
      • “What Terraform permissions are required to add a private link and recreate an Azure Key Vault?”
    5. When managing Terraform pipelines with private GKE Autopilot clusters, how do you ensure security and compliance across development and staging?

      Asked once · last asked Oct 3 · Scenario · Senior

    6. We use Terraform to provision our cloud infrastructure and need to make sure developers don't accidentally deploy public S3 buckets. How would you approach Terraform security?

      Asked once · last asked Oct 12 · Scenario · Senior

    7. How do you encrypt an existing CloudWatch log group that was created with OpenTofu?

      Asked once · last asked Oct 22 · Tooling · Mid-level

    How this list is made

    Every question here was asked by a real interviewer in a real job interview that a candidate ran MeetAssist in. After the call, the interviewer's questions are pulled from the transcript. Practice sessions, tests, exams and anything that was not a job interview are dropped.

    Questions are rewritten so they make sense on their own: names of people, employers and clients are removed, and speech-to-text mistakes are fixed. Small talk, logistics and questions about one candidate's own résumé are left out. Rephrasings of the same question are merged, and the count is the number of different interviews it came up in.

    The interviews come from candidates who use MeetAssist, so they lean towards software, data and AI roles: the shares describe these interviews, not every Terraform interview. Answers to the most asked questions are written and checked by an editor; a "common mistake" is shown only when reviews of real answers in these interviews show it, with the count.

    41 interviews, 32 candidates, Feb 2026 to Oct 2026. Updated every month with new interviews.