Reusable Terraform module for cloud infrastructure. Includes variables, outputs, and state management.
terraform {
required_version = ">= 1.5"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
variable "environment" {
type = string
default = "production"
}
resource "aws_instance" "app" {
ami = var.ami_id
instance_type = "t3.micro"
}Open in RoadCode