← All Templates

Terraform Module

HCLIntermediateDevOps

Reusable Terraform module for cloud infrastructure. Includes variables, outputs, and state management.

Features

Code Preview

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

Related Templates

Docker Compose
YAML · Intermediate
GitHub Action
YAML · Beginner