Terraform
Terraform
1. What is Terraform?
o A Terraform provider is a plugin that allows Terraform to interact with APIs of cloud
platforms like AWS, Azure, and GCP.
o Resources are defined in .tf files using the resource block, specifying the resource
type and configuration.
o A module in Terraform is a container for multiple resources that are used together.
Modules are used to organize and reuse code.
o Run terraform init to download the necessary providers and set up the environment
for your Terraform project.
o Terraform state is a file that keeps track of the infrastructure managed by Terraform,
mapping real-world resources to your configuration.
o Use terraform destroy to delete all resources managed by your Terraform project.
o A backend in Terraform defines where and how Terraform state is stored and how
operations are executed.
o terraform fmt formats your Terraform configuration files to follow a consistent style.
19. What is the difference between terraform apply and terraform taint?
o terraform apply creates or updates resources as defined, while terraform taint marks
a resource for destruction and recreation in the next apply.
o Update the provider version in your configuration and run terraform init -upgrade to
upgrade to the specified version.