kazhala / terraform-aws-ecs-ec2-cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

terraform-aws-ecs-ec2-cluster

Requirements

Name Version
terraform >= 0.14
aws >= 3.0

Providers

Name Version
aws 3.63.0

Modules

No modules.

Resources

Name Type
aws_autoscaling_group.ecs resource
aws_ecs_cluster.this resource
aws_iam_instance_profile.ecs_agent resource
aws_iam_role.ecs_agent resource
aws_iam_role_policy_attachment.ecs_agent resource
aws_launch_template.ecs resource
aws_iam_policy_document.ecs_assume_role data source
aws_ssm_parameter.ecs_ami data source

Inputs

Name Description Type Default Required
additional_user_data Additional user data to apply to the ECS instance Launch Configuration. string "" no
container_insights Enable ECS container insights. Allowed values: enabled | disabled. string "enabled" no
desired_capacity Desired number of instances for the cluster. number 1 no
health_check_grace_period Grace period between each scaling activity for EC2 instances in the ECS cluster. number 300 no
health_check_type Health checking method. Allowed values: ELB | EC2. string "EC2" no
image_id ECS instance image id. If not provided, the latest Linux Amazon ECS-optimized AMI will be used. string null no
instance_type The EC2 instance type to launch for the ECS cluster. string "t3.micro" no
load_balancers List of ELB names to attach to the cluster, for ALB use target_group_arns. list(string) null no
max_size Maximum number of instances for the cluster. number 1 no
min_size Minimum number of instances for the cluster. number 1 no
name The Name of the ECS cluster. string n/a yes
root_volume_device_name Name of the root device. /dev/sda1 for normal linux and /dev/xvda for amazon linux. string "/dev/xvda" no
root_volume_encrypted Encrypt EC2 instance ebs volume. bool true no
root_volume_size Size of the root volume. number 30 no
subnets List of subnet ids to deploy the ECS cluster.
Subnets should have outbound internet access as the ECS agent require internet access.
list(string) n/a yes
tags Additional resource tags to apply to applicable resources. Format: {"key" = "value"} map(string) {} no
target_group_arns List of Target Groups to attach to the cluster, for ELB use load_balancers. list(string) null no
vpc_id The ID of the VPC to deploy the ECS cluster. string n/a yes
vpc_security_group_ids List of security group to attach the instance. list(string) [] no

Outputs

Name Description
aws_autoscaling_group Outputs of the ASG.
aws_ecs_cluster Outputs of the ECS cluster.
aws_iam_instance_profile Outputs of the instane profile created.
aws_iam_role Outputs of the iam role created.
aws_launch_template Outputs of the launch template.

About

License:MIT License


Languages

Language:HCL 100.0%