Junior — Middle
What is the purpose of the Terraform tool in infrastructure management?
sobes.tech AI
Answer from AI
Terraform is an infrastructure as code (IaC) tool that allows you to describe and manage infrastructure resources declaratively. It enables creating, modifying, and versioning infrastructure in cloud and local environments, such as virtual machines, networks, databases, and more.
Main advantages of Terraform:
- Automation of infrastructure deployment.
- Configuration management as code, which facilitates reuse and version control.
- Support for multiple providers (AWS, Azure, GCP, VMware, etc.).
- Ability to make safe and predictable changes through planning (terraform plan).
Example of a simple AWS EC2 resource description:
provider "aws" {
region = "us-west-2"
}
resource "aws_instance" "example" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
}