Configuration in this directory creates:
- ECS cluster using EC2 autoscaling groups
- Autoscaling groups with IAM instance profile to be used by ECS cluster
- Example ECS service that utilizes
- Mounts a host volume into the container definition
- Load balancer target group attachment
- Security group for access to the example service
To run this example you need to execute:
$ terraform init
$ terraform plan
$ terraform applyNote that this example may create resources which will incur monetary charges on your AWS bill. Run terraform destroy when you no longer need these resources.
| Name | Version |
|---|---|
| terraform | >= 1.5.7 |
| aws | >= 6.27 |
| Name | Version |
|---|---|
| aws | >= 6.27 |
| Name | Source | Version |
|---|---|---|
| alb | terraform-aws-modules/alb/aws | ~> 10.0 |
| autoscaling | terraform-aws-modules/autoscaling/aws | ~> 9.0 |
| autoscaling_sg | terraform-aws-modules/security-group/aws | ~> 5.0 |
| ecs_cluster | ../../modules/cluster | n/a |
| ecs_service | ../../modules/service | n/a |
| vpc | terraform-aws-modules/vpc/aws | ~> 6.0 |
| Name | Type |
|---|---|
| aws_availability_zones.available | data source |
| aws_ssm_parameter.ecs_optimized_ami | data source |
No inputs.
| Name | Description |
|---|---|
| alb_dns_name | The DNS name of the load balancer |
| cluster_arn | ARN that identifies the cluster |
| cluster_autoscaling_capacity_providers | Map of capacity providers created and their attributes |
| cluster_capacity_providers | Map of cluster capacity providers attributes |
| cluster_id | ID that identifies the cluster |
| cluster_name | Name that identifies the cluster |
| service_autoscaling_policies | Map of autoscaling policies and their attributes |
| service_autoscaling_scheduled_actions | Map of autoscaling scheduled actions and their attributes |
| service_container_definitions | Container definitions |
| service_iam_role_arn | Service IAM role ARN |
| service_iam_role_name | Service IAM role name |
| service_iam_role_unique_id | Stable and unique string identifying the service IAM role |
| service_id | ARN that identifies the service |
| service_infrastructure_iam_role_arn | Infrastructure IAM role ARN |
| service_infrastructure_iam_role_name | Infrastructure IAM role name |
| service_name | Name of the service |
| service_task_definition_arn | Full ARN of the Task Definition (including both family and revision) |
| service_task_definition_revision | Revision of the task in a particular family |
| service_task_exec_iam_role_arn | Task execution IAM role ARN |
| service_task_exec_iam_role_name | Task execution IAM role name |
| service_task_exec_iam_role_unique_id | Stable and unique string identifying the task execution IAM role |
| service_task_set_arn | The Amazon Resource Name (ARN) that identifies the task set |
| service_task_set_id | The ID of the task set |
| service_task_set_stability_status | The stability status. This indicates whether the task set has reached a steady state |
| service_task_set_status | The status of the task set |
| service_tasks_iam_role_arn | Tasks IAM role ARN |
| service_tasks_iam_role_name | Tasks IAM role name |
| service_tasks_iam_role_unique_id | Stable and unique string identifying the tasks IAM role |
Apache-2.0 Licensed. See LICENSE.