Terraform Interview Questions:
====================================
1).what is the difference between terraform import and terraform move into terraform into our env
Effect on Terraform state
* terraform import
* Adds an existing resource to the Terraform state.
* Does not create or modify the actual infrastructure.
* terraform mv
* Moves or renames an existing resource within the Terraform state only.
* No impact on real infrastructure.
==================
terraform import aws_instance.my_ec2 i-1234567890abcdef
=====================
terraform mv aws_instance.old_name aws_instance.new_name
=======================
2).write a block for ec2 using the Terraform?
3).which terraform version we have to used into terraform >
1.5 and 1.6 version we have to used into it …
4).can you explain me the terraform import usage into terraform >
What is Terraform import?
* terraform import is used to bring existing infrastructure into Terraform state
* The resource already exists in the cloud and was not created by Terraform
6).what is the biggest issue which u have faced while u are in organisations into it?
7).where do you store the state file and managers the state file into terraform >
8).what is the use of modules into terraform into it?
module "vpc" {
source = "./modules/vpc"
cidr_block = "10.0.0.0/16"
}
===========
variable "vpc_cidr" {
description = "CIDR block for the VPC"
type = string
default = "10.0.0.0/16"
}
==========
output "vpc_id" {
description = "The ID of the VPC"
value = aws_vpc.this.id
}
output "public_subnet_id" {
description = "The ID of the public subnet"
value = aws_subnet.public.id
}
9).How we can restore the terraform state file in our enviornment ?
10).what is the terraform taint command into terraform ?
Terraform taint – Explained
1️⃣ What is terraform taint?
* terraform taint marks a resource as “tainted” in the Terraform state
* Terraform will destroy and recreate this resource on the next terraform apply
* Useful when a resource is broken, misconfigured, or corrupted, but you don’t want to touch the rest of the infrastructure
===========
terraform taint
===============
11).How to destroy the any particular service with terraform >
To destroy a particular Terraform-managed resource, use terraform destroy -target=which safely deletes only that resource and updates the state.”
HSBC Bank: Name : Srikanth Patil Mobile : 9513273723 Email Id : Srikanth.patil@hsbc.co.in How to check payslips : Go to the portal: here we can see the link: https://infinite.greyhr.com/login.do Quick links : GreytHR ---------------------------------------------------- Medical and group insurance : Contact : shafi +91 -7022557573 email address: mediclaimhelpdesk@infinite.com For any escalation write to : MYHR@infinite.com Quicklink -BIZX: https://bizx.inifinite.com --------------------------------------------------------- Axis Bank : Name : Ragini sharma Mobile Number: 8088982659 mail address: Ragini.sharma@axisbank.com --------------------------------------------------------- Name : Archishman Mobile number: 7678068570 mail address: Archishman.Deb@axisbank.com -------------------------------------------------------- Hdfc Bank : Name : Pavan katariya Mobile Number: 9986349366 Mail address: pavan.katariya@hdfcbank.com ----------------...
Comments
Post a Comment