In the past, to get a server, you had to file a ticket and wait 3 weeks. In the cloud, you can click buttons in a portal. But clicking buttons is error-prone and untraceable. Infrastructure as Code (IaC) allows you to define your entire Cloud environment (Databases, Servers, K8s clusters) using code files. Terraform is the industry-standard tool for this.
resource "azurerm_kubernetes_cluster" "toolliyo" {
name = "toolliyo-cluster"
location = "East US"
dns_prefix = "toolliyo"
default_node_pool {
node_count = 3
}
}
Q: "What is the 'Terraform State File' and why is it dangerous?"
Architect Answer: "The state file (`terraform.tfstate`) is the 'Source of Truth' that tracks your real-world resources. If you lose this file, Terraform has no idea what you've deployed and might try to create duplicate resources. It also often contains sensitive data (like DB passwords) in plain text. For professional teams, you must store the state file in a **Remote Backend** (like Azure Blob Storage or AWS S3) with state locking and encryption enabled."