/aws-ecs-module

Terraform module to deploy ECS Fargate using S3 ARN as environment variable

Primary LanguageHCL

aws-ecs-module

Terraform module to deploy ECS Fargate using S3 ARN as environment variable

Requirements

Name Version
terraform > 1.0.0
aws ~> 4.51.0

Providers

| aws | n/a |

Modules

Name Source Version
alb_main ../../modules/alb n/a
cluster_main ../../modules/fargate_cluster n/a
ecr_main ../../modules/ecr n/a
role_policy_main ../../modules/role_policy n/a
service_main ../../modules/ecs_service n/a
task_main ../../modules/task_definition/1 n/a

Resources

Name Type
aws_alb.main resource
aws_alb_listener.http resource
aws_alb_target_group.main resource
aws_lb_listener.https resource
aws_security_group.main resource
aws_ecr_repository.main resource
aws_ecs_service.main resource
aws_security_group.main resource
aws_ecs_cluster.fargate-cluster resource
aws_iam_role_policy.main resource
aws_cloudwatch_log_group.log_group resource
aws_ecs_task_definition.main resource
aws_iam_role.main resource
aws_eip.elastic-ip-for-nat-gw resource
aws_internet_gateway.terraform-igw resource
aws_nat_gateway.nat-gw resource
aws_route.nat-gw-route resource
aws_route.public-internet-igw-route resource
aws_route_table.private-route-table resource
aws_route_table.public-route-table resource
aws_route_table_association.private-route-1-association resource
aws_route_table_association.private-route-2-association resource
aws_route_table_association.private-route-3-association resource
aws_route_table_association.public-route-1-association resource
aws_route_table_association.public-route-2-association resource
aws_route_table_association.public-route-3-association resource
aws_subnet.private-subnet-1 resource
aws_subnet.private-subnet-2 resource
aws_subnet.private-subnet-3 resource
aws_subnet.public-subnet-1 resource
aws_subnet.public-subnet-2 resource
aws_subnet.public-subnet-3 resource
aws_vpc.main resource

Inputs

Name Description Type Default Required
alb_name Application Load Balancer name string n/a yes
certificate_arn ACM Certificate ARN string n/a yes
health_check Target group healthcheck path string n/a yes
internal Loadbalancer Internal(True or false) bool n/a yes
subnets List of Subnets list(string) n/a yes
target_group_port Target group port number n/a yes
vpc_id VPC ID string n/a yes
ecr_name value string n/a yes
assign_public_ip Assign public ip bool n/a yes
cluster_id ECS Cluster ID string n/a yes
container_name ECS Task Definition container name string null no
container_port ECS Task Definition container port string null no
desired_count ECS Service desired count string n/a yes
load_balancer Loadbalancer bool false no
service_name ECS Service name string n/a yes
service_port ECS Service port number n/a yes
subnets Subnet list list(string) n/a yes
target_group_arn Target Group ARN string null no
task_definition_arn ECS Task Definition ID string n/a yes
vpc_id VPC Id string n/a yes
ecs_cluster_name ECS Cluster Name string n/a yes
policy Policy JSON any n/a yes
policy_name IAM Policy Name string n/a yes
role_id IAM Role Id string n/a yes
container_image Container Image string n/a yes
container_name Container name string n/a yes
container_port Container Port number n/a yes
cpu Task definition CPU number n/a yes
environment_s3_arn Environment S3 file ARN string n/a yes
essential Container essential bool n/a yes
log_retention_days Log retention in days number n/a yes
memory Task deifnition memory number n/a yes
region awslogs region string n/a yes
task_name Task definition name string n/a yes
private_subnet_1_cidr Private subnet az1 CIDR string n/a yes
private_subnet_2_cidr Private subnet az2 CIDR string n/a yes
private_subnet_3_cidr Private subnet az3 CIDR string n/a yes
proj_name Project Name string n/a yes
public_subnet_1_cidr Public subnet az1 CIDR string n/a yes
public_subnet_2_cidr Public subnet az2 CIDR string n/a yes
public_subnet_3_cidr Public subnet az3 CIDR string n/a yes
region AWS Region string "us-east-1" no
vpc_cidr VPC CIDR string n/a yes

Outputs

Name Description
target_group_arn n/a
repository_uri n/a
id n/a
arn n/a
container_name n/a
container_port n/a
role_id n/a
private_subnet-1_id n/a
private_subnet-2_id n/a
private_subnet-3_id n/a
public_subnet-1_id n/a
public_subnet-2_id n/a
public_subnet-3_id n/a
vpc_id n/a