Terraform Interview Questions | Terraform Scenario Questions | DevOps Interview Series | Terraform

preview_player
Показать описание
Terraform Real Time Interview Questions Terraform Interview Questions | Terraform Scenario Questions | DevOps Interview Series | Terraform | 03

Hey Folks,

Welcome back to another video in the series of DevOps Interviews. This is the 3rd video in this series. This is a complete 17-minute-long technical video purely on #Terraform. Pick a pen and paper, and note down the questions we have covered in this video.

Like | Share | Subscribe | Follow

terraform devops,terraform interview questions and answers for devops engineer,terraform interview questions,terraform modules,terraform interview questions for experienced,terraform interview questions and answers,terraform scenario based,terraform scenario based interview questions,terraform scenario based questions,terraform scenario,terraform real time interview questions,terraform scenario questions,devops terraform interview questions,terraform interview

NOTICE/DISCLAIMER - We take permission/consent from the Candidate/Agency/Organisation before posting these interviews. Without consent/permission, we DO/WILL NOT publish any content in public.
Рекомендации по теме
Комментарии
Автор

Thanks me later -- > Question: When you created the environment using Terraform, what components did you create using Terraform?

Answer: I created resource groups, storage accounts, network security groups, application gateways, and VMs using Azure providers. While Terraform supports different providers like GCP or AWS, I used Azure since I have experience with it.
Question: How can you make changes in the configuration of already created resources using Terraform?

Answer: To make changes in the configuration of already created resources, we can use the terraform import command.
Question: What does Terraform do with the state file when it runs?

Answer: Terraform maintains a state file that maps the current status of the infrastructure with the configuration file. The state file is commonly stored either locally or in remote storage locations like Azure Storage or AWS S3.
Question: In case the state file is lost, how do you resolve that issue?

Answer: If the state file is lost, using the terraform import command can help. It allows Terraform to reconcile the cloud infrastructure state with the expected state.
Question: What are the major features of Terraform that you find noteworthy?

Answer: Terraform can manage infrastructure across multiple cloud platforms (Azure, GCP, AWS), uses HashiCorp Configuration Language (HCL), supports infrastructure code, and allows tracking resource changes throughout deployments.
Question: What is the full form of HCL?

Answer: HCL stands for HashiCorp Configuration Language.
Question: Can you explain the purpose of the terraform validate command?

Answer: The terraform validate command is used to validate the syntax of Terraform files, performing a syntax check to identify errors in the configuration.
Question: What is the lifecycle block in Terraform?

Answer: The lifecycle block is a nested block within a resource block, containing meta-arguments for resource behavior, such as create_before_destroy, prevent_destroy, and others.
Question: Have you worked with other tools like CloudFormation or Ansible?

Answer: Yes, I have worked with Ansible. When comparing Terraform and Ansible, the choice depends on the specific needs and the nature of the infrastructure.
Question: If given a choice between Ansible and Terraform, which one would you prefer, and why?

Answer: The choice between Ansible and Terraform depends on the specific needs. Terraform is suitable for maintaining a steady state in infrastructure, while Ansible excels in managing and configuring evolving environments.
Question: Have you heard about Pulumi?

Answer: Yes, I have heard about Pulumi. One notable feature is that Pulumi allows using multiple languages like Python, TypeScript, or JavaScript for configuration.
Question: Have you heard about Bicep or ARM templates?

Answer: Yes, I have heard about Bicep, and I have worked on ARM templates in the past.
Question: Is it possible to destroy a single resource out of multiple resources using Terraform?

Answer: Yes, it is possible. We can use the terraform destroy -target command followed by the resource type and name to destroy a specific resource.
Question: How do you preserve keys created using Terraform?

Answer: Keys created using Terraform can be preserved by storing them in the AWS CLI configuration folder under the credentials directory and instructing Terraform to use a specific profile during execution.
Question: What happens if the Terraform state file is accidentally deleted?

Answer: If the Terraform state file is deleted, Terraform may duplicate all resources, leading to increased costs and potential issues with overlapping and cross-pollination between resources.
Question: Have you worked with Terraform modules?

Answer: Yes, I have worked with Terraform modules. There are root modules, child modules, and published modules in Terraform.
Question: How do you manage Terraform code in multiple environments?

Answer: Terraform workspaces and reusable modules can be used to manage Terraform code in multiple environments, allowing separate state files for each workspace.
Question: What is Terraform workspace used for?

Answer: Terraform workspace allows managing separate state files for each workspace, enabling different environment processing.
Question: How do you provide variable values at runtime in Terraform?

Answer: To provide variable values at runtime in Terraform, the default values in the variable file (variable.tf) can be removed, and the values can be provided when running the Terraform command.
Question: Why is Terraform called "Infrastructure as Code"?

Answer: Terraform is referred to as "Infrastructure as Code" because it involves writing code to provision, manage, and deploy infrastructure. It uses a declarative approach to define infrastructure elements using HashiCorp Configuration Language (HCL).

Question: Can you mention some drawbacks of Terraform based on your experience?

Answer: Some drawbacks include a lack of error handling, restriction to a specific language (HCL), limitations on importing certain things, lack of script generation support, and occasional bugs in specific Terraform versions.
Question: In your organization, which version of Terraform are you currently using?

Answer: Currently, we are not using Terraform in our organization.

akshayfasale
Автор

Seems like the answers are being read....such smooth articulation is sus!
Anyways, a good mock interview at the least
..cheers

rohits.k.
Автор

Great concepts and fluent answers. similar questions were asked during my interviews.

KamranAli-lxcm
Автор

Questions in this Interview:

When you created the environment using Terraform, what components did you set up using Terraform?
How do you make changes to the configuration of already created resources using Terraform?
When the Terraform state file is created, what do you do with that state file and where do you store and find it?
How do you resolve the issue if you lose the Terraform state file?
What are the major features you have found in Terraform that you can talk about?
What are the major features you have found in Terraform that you can talk about?
What is the `terraform validate` command used for, and can you provide an example?
Have you ever heard about the lifecycle in Terraform? Can you talk more about it?
Have you worked with tools like CloudFormation, Ansible, or anything similar?
Do you have any experience with Ansible?
If you had to choose between Ansible and Terraform, which one would you prefer and why?
In your current organization, which tool are you using: Ansible, Terraform, or Pulumi?
Can you talk about any features of Pulumi that you find particularly useful or impressive?
Have you ever heard about Bicep or ARM templates?
In a scenario where you have 20 resources running on a public cloud (AWS or Azure) and you want to destroy just one resource, how would you go about doing that?
Have you ever preserved a key that you created using Terraform?
What happens if you delete the Terraform state file and then run the `terraform apply` or `terraform plan` command?
Have you ever worked with modules in Terraform?
What are the different types of modules in Terraform?
The module that gets called is what: a parent module or a child module?
From where we call a module, what is that module called?
Have you ever heard about remote backends in Terraform? Do you have any ideas or experience with them?
How can you provide variable values at runtime in Terraform?
In an organization, how do you manage multiple environments in Terraform?
Why do we call Terraform "Infrastructure as Code" (IaC)? Is there a particular reason for this?
Can you explain some drawbacks or challenges you have faced in your career?
Which version of Terraform are you using?

KamranAli-lxcm
Автор

Hi, I am not here to demean your effort but I am terraform engineer working in Ireland and this questionnaire answers are theoretical and looks like someone is reading script whereas in general, I have given or taken a whiteboard based Terraform interview writing a piece of code.

TeenaKohli
Автор

All the answers given in reading notes, for example
lifecycle is a nested block that can appear within a resource block. The lifecycle block and its contents are meta-arguments, available for all resource blocks regardless of type.

The arguments available within a lifecycle block are create_before_destroy, prevent_destroy, ignore_changes, and replace_triggered_by

pramodpunnuche
Автор

For a long time I was looking for this type of interview questions, Again thanks 😊

manojpal
Автор

Flawless interview 👍. Please also include the part where candidates introduce themselves and talk about their BAU. Need more such videos. Many thanks Ravish.

amolghanwat
Автор

Amazing confidence. Such perfect answers, selection is must. I wonder I'd have this much grasp over Terraform.
Thanks for putting this together 🙏🏻

riddhimar
Автор

Perfect example, that's something I was looking for.

nehagahilot
Автор

Awesome Interview. Learning a lot from your Interview videos. Keep up the good work and keep posting content like this. Thanks 👍💯

rachz
Автор

Sharing knowledge is also - Caring for others

rkgramani
Автор

Nice video who actually don't know terrform it will be useful

bharathimuppalla
Автор

Boss if we delete 1 resource manually out of three resource created by terraform apply then it will not create entire infra after we do terraform apply. existing resources will not change if no changes happened

SamadhanGapat-rt
Автор

Thanks Ravish bhai. Nice interview. At 3:40, the interviewee mentioned about infra costs getting doubled if we try to recreate the terraform configuration using terraform apply in case we lose the state file, which is would nasty cross-pollination exactly mean?

ibmuser
Автор

Thank you for making these inetrview series but i heared all questions and answers and noticed that the candidate giving answer from google same as witten there nice startegy . Thats's why both are not showing there face 🤓🤓🤓🤓🤓

vishallifezone
Автор

life cycle of terraform?
copy paste from terraform documentation.

lifecycle is a nested block that can appear within a resource block. The lifecycle block and its contents are meta-arguments, available for all resource blocks regardless of type.

The arguments available within a lifecycle block are create_before_destroy, prevent_destroy, ignore_changes, and replace_triggered_by.

saisandeep
Автор

Hi please let me know answer for this question - How to do the changes in the configuration of already created resources using Terraform

kishorek
Автор

Osm videos.
Can you please make video on Prometheus and Grafana interview.

RamKharche
Автор

Perfect thanks bro . Please share more interviews Questions and answers ❤

manojpal