Skip to content

StuxxNet/iac-aws-ec2

Repository files navigation

Requirements

Name Version
aws 4.65.0

Providers

Name Version
aws 4.65.0

Modules

No modules.

Resources

Name Type
aws_eip.public_access resource
aws_iam_instance_profile.ec2_instance_profile resource
aws_iam_policy.instance_profile_policy resource
aws_iam_role.instance_profile_role resource
aws_iam_role_policy_attachment.instance_profile_policy_attachment resource
aws_instance.this resource
aws_key_pair.access_key resource
aws_kms_alias.this resource
aws_kms_key.this resource
aws_network_interface.this resource
aws_security_group.this resource
aws_security_group_rule.example resource
aws_ami.ubuntu data source
aws_iam_policy_document.instance_profile_assume_role data source

Inputs

Name Description Type Default Required
associate_public_ip_address Associate a public IP address with the instance bool true no
default_tags Default tags to apply to all resources map(string)
{
"Environment": "Dev"
}
no
ebs_block_devices A list of EBS block devices to attach to the instance
list(object({
device_name = string
volume_size = number
}))
null no
enable_hibernation Enable hibernation for the instance bool false no
instance_name The name of the EC2 instance string "terraformed-ec2-instance" no
instance_profile_policy_path The policy to attach to the instance profile string "" no
instance_type The type of EC2 instance to run string "t3.micro" no
private_ip The private IP address to assign to the instance string n/a yes
public_access_key The public access key to use for SSH string n/a yes
root_volume_size The size of the root volume in GB number 8 no
security_group_rules A list of security group rules to apply to the instance
map(object({
type = string
port = number
protocol = string
cidr_blocks = list(string)
}))
null no
subnet_id The subnet ID to launch the instance in string n/a yes
user_data The user data to run when the instance starts string "" no
vpc_id The VPC ID to launch the instance in string n/a yes

Outputs

Name Description
instance_id value of the instance id

About

Module to spinup new EC2 machines in AWS

Resources

Stars

Watchers

Forks

Packages

No packages published