ecs

DNXLabs/ecs/aws

Terraform Module HCL AWS

This terraform module builds an Elastic Container Service(ECS) Cluster in AWS.

Install
module "ecs" {
source = "DNXLabs/ecs/aws"
version = "6.21.0"
}
plain text: /constructs/tfmod-dnxlabs-ecs-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

terraform-aws-ecs ![Lint Status](https://github.com/DNXLabs/terraform-aws-ecs/actions) ![LICENSE](https://github.com/DNXLabs/terraform-aws-ecs/blob/master/LICENSE) This terraform module builds an Elastic Container Service(ECS) Cluster in AWS. The following resources will be created: - Elastic File System (EFS) - Auto Scaling - CloudWatch alarms for (Application Load Balancer ,Auto Scale,ECS and EFS) - S3 Bucket to store logs from the application Load Balancer access - Security groups for (ALB,ALB-INTERNAL,ECS NODES, RDS DB) - Web Application Firewall (WAF) - Instances for ECS Workers - IAM roles and policies for the container instances In addition you have the option to create or not : - Application Load Balancer (ALB) - alb - An external ALB - alb_internal - A second internal ALB for priv

Inputs (50)
NameTypeDescriptionDefault
certificate_arnstring required
secure_subnet_idslist(string)List of secure subnet IDs for EFS. required
namestringName of this ECS cluster. required
public_subnet_idslist(string)List of public subnet IDs for ECS ALB. required
alarm_ecs_high_memory_thresholdnumberMax threshold average Memory percentage allowed in a 2 minutes interval (use 0 t80
security_group_ecs_nodes_outbound_cidrslist(string)ECS Nodes outbound allowed CIDRs for the security group.[ "0.0.0.0/0" ]
asg_maxnumberMax number of instances for autoscaling group.4
alarm_sns_topicslistAlarm topics to create and alert on ECS instance metrics.[]
alarm_asg_high_cpu_thresholdnumberMax threshold average CPU percentage allowed in a 2 minutes interval (use 0 to d80
provisioned_throughput_in_mibpsnumberThe throughput, measured in MiB/s, that you want to provision for the file syste0
architecturestringArchitecture to select the AMI, x86_64 or arm64"x86_64"
schedule_cron_stopstringCron expression to define when to trigger a stop of the auto-scaling group. E.g.""
security_group_idslist(string)Extra security groups for instances.[]
efs_key_arnstringARN of a KMS Key to use on EFS volumes""
code_deployboolEnables CodeDeploy role to be used for deploymenttrue
alb_sg_allow_alb_test_listenerboolWhether to allow world access to the test listenerstrue
throughput_modestringThroughput mode for the file system. Defaults to bursting. Valid values: burstin"bursting"
efs_lifecycle_transition_to_iastringOption to enable EFS Lifecycle Transaction to IA""
alb_enable_deletion_protectionboolEnable deletion protection for ALBsfalse
certificate_internal_arnstringcertificate arn for internal ALB.""
asg_target_capacitynumberTarget average capacity percentage for the ECS capacity provider to track for au70
schedule_cron_startstringCron expression to define when to trigger a start of the auto-scaling group. E.g""
wafv2_managed_rule_groupslist(string)List of WAF V2 managed rule groups, set to count[ "AWSManagedRulesCommonRuleSet" ]
alarm_ecs_high_cpu_thresholdnumberMax threshold average CPU percentage allowed in a 2 minutes interval (use 0 to d80
… and 10 more inputs
Outputs (27)
private_key_pem
ecs_service_iam_role_name
ecs_iam_role_name
ecs_service_iam_role_arn
ecs_codedeploy_iam_role_arn
ecs_id
alb_listener_https_arn
alb_internal_listener_https_arn
alb_arn
alb_internal_id
ecs_task_iam_role_arn
ecs_task_iam_role_name
alb_listener_test_traffic_arn
alb_internal_secgrp_id
efs_fs_id
alb_id
alb_dns_name
alb_zone_id
alb_internal_zone_id
ecs_iam_role_arn
alb_internal_listener_test_traffic_arn
ecs_nodes_secgrp_id
alb_secgrp_id
alb_internal_arn
alb_internal_dns_name
ecs_arn
ecs_name
Resources (27)
aws_autoscaling_groupaws_autoscaling_scheduleaws_cloudformation_stackaws_cloudwatch_log_resource_policyaws_cloudwatch_metric_alarmaws_ecs_capacity_provideraws_ecs_clusteraws_ecs_cluster_capacity_providersaws_efs_file_systemaws_efs_mount_targetaws_iam_instance_profileaws_iam_roleaws_iam_role_policyaws_iam_role_policy_attachmentaws_iam_service_linked_roleaws_key_pairaws_launch_templateaws_lbaws_lb_listeneraws_lb_listener_certificateaws_lb_target_groupaws_security_groupaws_security_group_ruleaws_wafv2_web_aclaws_wafv2_web_acl_associationrandom_stringtls_private_key
Details
FrameworkTerraform Module
LanguageHCL
Version6.21.0
Cloud AWS
★ Stars31
Forks33
Total downloads6.2k
Inputs50
Outputs27
Resources27
LicenseApache-2.0
NamespaceDNXLabs
Updated