ecs-fargate

g31s/ecs-fargate/aws

Terraform Module HCL AWS

ECS Fargate Terraform Module with Appmesh and Cloudmap support

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

Terraform AWS ECS Fargate Module The module is developed to quickly implement fargate cluster for appmesh microservices or virtual gateway. Following are the features Features - Appmesh - Cloudmap service - Virtual Gateway envoy proxy with a load balancer - Sidecars supported: - envoy proxy - aws xray - Secret Manager - Parameter Store - Elastic container registry (ECR) - Auto Scaling - Cloudwatch Dashboard - SSL cert on LB - Cloudwatch Dashboard Security Recommendations We suggest that you provide KMS keys for ECR and Cloudwatch encryption. Example Following example creates fargate cluster for appmesh service `` module "test" { source = "github.com/g31s/ecs-fargate" // project variables region = var.region vpc = "vpc object" env = "dev" // app variables app_name = "test" app_port = "80" c

Inputs (37)
NameTypeDescriptionDefault
vpcstringvpc id to create resources required
envstringapp deployment environment required
app_namestringapplication name required
app_portstringapp port to expose required
cloudmap_servicestringregister service in cloudmap required
appmeshstringappmesh resource to create virtual node and service required
regionstringregion where to create resources required
parameterslistallow farget task to access parameter store[]
fargate_memorystringfargate instance memory to provision (in MiB)"2048"
secretslistallow fargate task access to secret manager secrets.[]
lb_access_logs_s3_bucketstrings3 name to store lb vars""
max_task_countnumberminimum number of app containers running10
nlb_stickinessboolenable stickiness for network load balancerfalse
health_checkboolenable healthcheck for taget grouptrue
tagsmap(string)tags to add to all resources created with this module{ "Module": "ecs-fargate", "Terrafor
sg_prefixslist(string)vpc endpoint prefixs to be added to sg[]
health_check_timeoutnumberset timeout for healthcheck in seconds10
min_task_countnumberminimum number of app containers running1
aws_appmesh_virtual_node_arnstringset appmesh virtual node arn"none"
ecr_kms_key_arnstringprovide ecr kms key for customer encryption""
enable_cross_zone_load_balancingboolenable cross zone load balancing for lbfalse
cw_dashboardstringset to true to add cloudwatch dashboard"none"
log_retention_in_daysnumberlog retention logs in days90
cloudwatch_kms_key_arnstringprovide cloud watch kms key for customer encryption""
app_imagestringdocker image or by default creates ECS repo"none"
xraybooladd xray daemon as sidecarfalse
extra_portslist(string)additional ports to expose. useful case: rabbitmq[]
Outputs (8)
ecr_repo_name — ECR repo name
nlb_arn
nlb_dns_name
nlb_zone_id
target_group_arn
ecs_cluster_arn — ECS cluster arn
ecs_service_arn — ECS service arn
ecr_repo_url — ECR repo url
Resources (17)
aws_appautoscaling_policyaws_appautoscaling_targetaws_cloudwatch_dashboardaws_cloudwatch_log_groupaws_cloudwatch_log_streamaws_cloudwatch_metric_alarmaws_ecr_repositoryaws_ecs_clusteraws_ecs_serviceaws_ecs_task_definitionaws_iam_policyaws_iam_roleaws_iam_role_policy_attachmentaws_lbaws_lb_listeneraws_lb_target_groupaws_security_group
Details
FrameworkTerraform Module
LanguageHCL
Version2.0.3
Cloud AWS
★ Stars10
Forks6
Total downloads11.2k
Inputs37
Outputs8
Resources17
LicenseGPL-3.0
Namespaceg31s
Updated