Simple Terraform AWS EC2 Instance - Terraform Typing CST Test
Loading…
Simple Terraform AWS EC2 Instance — Terraform Code
A simple Terraform configuration to launch an AWS EC2 instance.
# terraform/demo.tf
provider "aws" {
region = "us-east-1"
}
resource "aws_instance" "example" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
tags = {
Name = "ExampleInstance"
}
}Terraform Language Guide
Terraform is an open-source Infrastructure as Code (IaC) tool by HashiCorp that allows users to define, provision, and manage cloud and on-premises infrastructure using declarative configuration files.
Primary Use Cases
- ▸Provisioning cloud infrastructure (VMs, networking, storage)
- ▸Managing Kubernetes clusters
- ▸Automating multi-cloud deployments
- ▸Creating modular reusable infrastructure components
- ▸Version-controlling infrastructure changes
Notable Features
- ▸Declarative configuration using HCL
- ▸Multi-cloud support
- ▸State management for infrastructure tracking
- ▸Plan and apply workflow for safe changes
- ▸Extensible via Terraform providers and modules
Origin & Creator
Created by HashiCorp and first released in 2014.
Industrial Note
Widely used in DevOps, cloud engineering, hybrid cloud setups, and industrial IoT deployments that require reproducible infrastructure configuration.