Patterned Designs HCL Module Registry
v0.1.0 latest View all versions

Terraform module for ec2-instance on aws

View Full Documentation Usage guides, examples & best practices
module "ec2-instance" {
  source  = "registry.patterneddesigns.ca/patterneddesigns/ec2-instance/aws"
  version = "0.1.0"
}
instance_name required
string

Name tag for the EC2 instance. Appears in the AWS Console for identification.

ami_id required
string

AMI ID for the instance. AMI IDs are region-specific. Use data sources instead of hardcoded AMI IDs.

subnet_id required
string

Subnet ID for the instance. Use private subnets for backend services, public subnets for internet-facing instances.

instance_type
string default: t3.micro

EC2 instance type. Common types: t3.micro (dev), t3.small (small apps), t3.medium (general purpose), m5.large (production).

instance_id

ID of the EC2 instance. Use this for resource references.

public_ip

Public IP address of the instance (if applicable).

private_ip

Private IP address of the instance.