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.”
AWS Interview Questions:
1).could you please explain the spot instances and configuring about the spot ec2 instances into aws environment ? 2).what is the mfa and how to configure the mfa into iam ? 3).security groups and tell about it the concepts 4).vpc endpoints and how to configure the those things ? 5).vpc flow logs 6).AWS CLI into aws environment? ------------------------------------------------ AWS Interview Questions: 1).IAM roles into aws environment: 2).Custom IAM role and policy into aws environment? IAM Role : which is used to establish the communication between the different iam services into aws environment IAM policy into aws environment: which is use to tell us what kind of activity you can perform on each services into aws environments: maybe it would be like as the, read ,write and execute How to create IAM role and policy into aws environment? first create the iam role without allocated the policy: give the aws services choose use case or aws services then don't choose any policy ...
Comments
Post a Comment