Skip to content

Latest commit

 

History

History
134 lines (106 loc) · 7.63 KB

README.md

File metadata and controls

134 lines (106 loc) · 7.63 KB

AWS SSM EC2 Terraform module 🤖

Terraform module which creates an SSM compatible EC2 instance on AWS. By default uses KMS encrypted storage.

Usage

module "ec2" {
  source = "github.com/stuxcd/terraform-aws-ssm-ec2.git?ref={VERSION}"

  ## required
  vpc_id    = "vpc-1234567890"
  subnet_id = "subnet-1234567890"

  ## optional
  # create                        = true
  # additional_security_group_ids = []
  # launch_template_name          = "my-custom-launch-template"
  # launch_template_version       = ""
  # instance_size                 = ""
  # tags                          = {}
}

Requirements

Name Version
terraform >= 1.0.0
aws >= 4.0
random >= 3.0

Providers

Name Version
aws >= 4.0
random >= 3.0

Modules

No modules.

Resources

Name Type
aws_iam_instance_profile.this resource
aws_iam_role.this resource
aws_iam_role_policy_attachment.this resource
aws_instance.launch_template resource
aws_instance.standalone resource
aws_kms_key.ec2_volume resource
aws_security_group.this resource
aws_security_group_rule.this resource
random_pet.global_name resource
aws_ami.ubuntu data source
aws_caller_identity.current data source
aws_iam_policy_document.ec2_volume data source
aws_region.current data source

Inputs

Name Description Type Default Required
additional_security_group_ids The identifier of a custom security group ID, replaces default list(string) [] no
instance_size The size of the EC2 instance to deploy string "t3a.small" no
launch_template_name The name of the launch template to use string "" no
launch_template_version The launch template version string "$Default" no
subnet_id The identifier of subnet to deploy EC2 instance into string n/a yes
vpc_id The identifier of VPC to deploy EC2 instance into string "" no

Outputs

Name Description
ec2_instance_name The name of the EC2 instance created

Requirements

Name Version
terraform >= 1.0.0
aws >= 4.0
random >= 3.0

Providers

Name Version
aws 4.63.0
random 3.5.1

Modules

Name Source Version
role terraform-aws-modules/iam/aws//modules/iam-assumable-role 5.17.0

Resources

Name Type
aws_iam_instance_profile.this resource
aws_instance.launch_template resource
aws_instance.standalone resource
aws_security_group.this resource
aws_security_group_rule.this resource
random_pet.global_name resource
aws_ami.ubuntu data source
aws_kms_key.ebs data source

Inputs

Name Description Type Default Required
additional_security_group_ids The identifier of a custom security group ID, replaces default list(string) [] no
create Controls if EKS resources should be created (affects nearly all resources) bool true no
instance_size The size of the EC2 instance to deploy string "t3.micro" no
launch_template_name The name of the launch template to use string "" no
launch_template_version The launch template version string "$Default" no
subnet_id The identifier of subnet to deploy EC2 instance into string n/a yes
tags A map of tags to add to all resources map(string) {} no
vpc_id The identifier of VPC to deploy EC2 instance into string "" no

Outputs

Name Description
ec2_instance_name The name of the EC2 instance created
role_arn The ARN of the role created