Skip to content

Files

ec2

Requirements

No requirements.

Providers

Name Version
aws n/a

Modules

No modules.

Resources

Name Type
aws_ebs_volume.ebs_volume resource
aws_instance.ec2 resource
aws_volume_attachment.volume_attachement resource
aws_region.current data source

Inputs

Name Description Type Default Required
ami_id AMI ID to use for launching this instance any n/a yes
associate_public_ip_address Whether to associate a public IP to this instance any n/a yes
availability_zones AWS Availability zones where instances should be launched list(string) n/a yes
business_name A Business tag will be used on aws resources for costs calculation any n/a yes
created_by A maintainer tag will be added to aws launched resources any n/a yes
ebs_volume_count No of EBS volumes to be attached per instance number 0 no
ebs_volume_size Disk Volume Size for all ebs attached disks number 20 no
ebs_volume_type n/a string "gp3" no
ec2_device_names Name of the EBS device to mount list(string)
[
"/dev/xvdb",
"/dev/xvdc",
"/dev/xvdd",
"/dev/xvde",
"/dev/xvdf",
"/dev/xvdg",
"/dev/xvdh",
"/dev/xvdi",
"/dev/xvdj",
"/dev/xvdk",
"/dev/xvdl",
"/dev/xvdm",
"/dev/xvdn",
"/dev/xvdo",
"/dev/xvdp",
"/dev/xvdq",
"/dev/xvdr",
"/dev/xvds",
"/dev/xvdt",
"/dev/xvdu",
"/dev/xvdv",
"/dev/xvdw",
"/dev/xvdx",
"/dev/xvdy",
"/dev/xvdz"
]
no
ec2_instance_count the numbers of EC2 instances to be launched any n/a yes
environment An environment tag will be used on aws resources any n/a yes
extra_instance_tags Extra tags for instances to be launched in ASG map(string) {} no
iam_instance_profile IAM role for this instance string "" no
instance_keyname SSH KeyPair name for this instance any n/a yes
instance_type AWS Instance Type for the instance - eg c6g.xlarge/m5.2xlarge any n/a yes
root_volume_size Size of the Root Disk Volume number 20 no
root_volume_type Root Disk Volume Type - Allowed values = gp2/gp3/st1 string "gp3" no
security_group_ids List of security group ids to be assigned to this instance list(string) n/a yes
service_name Service name will be used in DNS, naming resources, costs calculation etc, any n/a yes
subnet_ids Subnets where this instance can be launched list(string) n/a yes
subservice_name SubService name will be used in DNS, naming resources etc, any n/a yes
user_data user data for the instance string "" no

Outputs

Name Description
id List of IDs of instances
private_ip List of private IP addresses assigned to the instances