Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/infraspecdev/terraform-aws-ecs

Terraform module to create ECS Cluster that relies on self-managed EC2 instances
https://github.com/infraspecdev/terraform-aws-ecs

aws-ecs aws-ecs-cluster ec2 terraform-aws-module terraform-module

Last synced: about 19 hours ago
JSON representation

Terraform module to create ECS Cluster that relies on self-managed EC2 instances

Awesome Lists containing this project

README

        

# terraform-aws-ecs

A Terraform module to create ECS Cluster that relies on self-managed EC2 instances.

## Architecture Diagram

![ECS Architecture Diagram](https://github.com/infraspecdev/terraform-aws-ecs/raw/main/diagrams/ecs-architecture.png)

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.8.4 |
| [aws](#requirement\_aws) | >= 5.51.0 |

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| [asg](#module\_asg) | ./modules/asg | n/a |
| [cluster](#module\_cluster) | ./modules/cluster | n/a |

## Resources

No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [asg\_create\_launch\_template](#input\_asg\_create\_launch\_template) | Either to create a Launch Template to associate with the Autoscaling group | `bool` | `true` | no |
| [asg\_desired\_capacity](#input\_asg\_desired\_capacity) | The number of Amazon EC2 instances that should be running in the group. | `number` | n/a | yes |
| [asg\_health\_check\_type](#input\_asg\_health\_check\_type) | (Optional) "EC2" or "ELB". Controls how health checking is done. | `string` | `"EC2"` | no |
| [asg\_iam\_instance\_profile\_name](#input\_asg\_iam\_instance\_profile\_name) | (Optional, Forces new resource) Name of the instance profile. | `string` | `null` | no |
| [asg\_iam\_instance\_profile\_tags](#input\_asg\_iam\_instance\_profile\_tags) | (Optional) Map of resource tags for the IAM Instance Profile. | `map(string)` | `{}` | no |
| [asg\_iam\_role\_name](#input\_asg\_iam\_role\_name) | (Optional, Forces new resource) Friendly name of the role. | `string` | `null` | no |
| [asg\_iam\_role\_policy\_attachments](#input\_asg\_iam\_role\_policy\_attachments) | (Optional) - The ARNs of the policies you want to apply | `list(string)` |

[
"arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role"
]
| no |
| [asg\_iam\_role\_tags](#input\_asg\_iam\_role\_tags) | Key-value mapping of tags for the IAM role. | `map(string)` | `{}` | no |
| [asg\_instances\_tags](#input\_asg\_instances\_tags) | Resources Tags to propagate to the Instances | `map(string)` | `{}` | no |
| [asg\_launch\_template](#input\_asg\_launch\_template) | Launch Template to use with the Autoscaling group |
object({
name = optional(string, null)
block_device_mappings = optional(list(object({
device_name = string
ebs = optional(object({
delete_on_termination = optional(bool, null)
snapshot_id = optional(string, null)
volume_size = optional(number, null)
volume_type = optional(string, null)
}))
no_device = optional(any, null)
virtual_name = optional(string, null)
})), [])
image_id = optional(string, null)
instance_type = optional(string, null)
vpc_security_group_ids = optional(list(string), [])
key_name = optional(string, null)
user_data = optional(string, null)
tags = optional(map(string), {})
})
| `{}` | no |
| [asg\_launch\_template\_id](#input\_asg\_launch\_template\_id) | Identifier of the Launch Template | `string` | `null` | no |
| [asg\_launch\_template\_version](#input\_asg\_launch\_template\_version) | (Optional) Template version. | `string` | `"$Default"` | no |
| [asg\_max\_size](#input\_asg\_max\_size) | Maximum size of the Auto Scaling Group | `number` | n/a | yes |
| [asg\_min\_size](#input\_asg\_min\_size) | Minimum size of the Auto Scaling Group | `number` | n/a | yes |
| [asg\_name](#input\_asg\_name) | (Optional) Name of the Auto Scaling Group. | `string` | `null` | no |
| [asg\_protect\_from\_scale\_in](#input\_asg\_protect\_from\_scale\_in) | (Optional) Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. | `bool` | `false` | no |
| [asg\_tags](#input\_asg\_tags) | Resources Tags for Autoscaling group | `map(string)` | `{}` | no |
| [asg\_vpc\_zone\_identifier](#input\_asg\_vpc\_zone\_identifier) | (Optional) List of subnet IDs to launch resources in. | `list(string)` | `[]` | no |
| [cluster\_name](#input\_cluster\_name) | (Required) Name of the cluster | `string` | n/a | yes |
| [cluster\_service\_connect\_namespace](#input\_cluster\_service\_connect\_namespace) | (Optional) ARN of the aws\_service\_discovery\_http\_namespace that's used when you create a service and don't specify a Service Connect configuration. | `string` | `null` | no |
| [cluster\_setting](#input\_cluster\_setting) | (Optional) Configuration block(s) with cluster settings. |
list(object({
name = string
value = string
}))
| `[]` | no |
| [cluster\_tags](#input\_cluster\_tags) | (Optional) Key-value map of resource tags. | `map(string)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| [asg\_arn](#output\_asg\_arn) | ARN for this Auto Scaling Group. |
| [asg\_iam\_instance\_profile\_arn](#output\_asg\_iam\_instance\_profile\_arn) | ARN assigned by AWS to the instance profile. |
| [asg\_iam\_instance\_profile\_id](#output\_asg\_iam\_instance\_profile\_id) | Instance profile's ID. |
| [asg\_iam\_role\_id](#output\_asg\_iam\_role\_id) | Name of the role. |
| [asg\_id](#output\_asg\_id) | Auto Scaling Group id. |
| [asg\_launch\_template\_arn](#output\_asg\_launch\_template\_arn) | Amazon Resource Name (ARN) of the launch template. |
| [asg\_launch\_template\_id](#output\_asg\_launch\_template\_id) | The ID of the launch template. |
| [cluster\_arn](#output\_cluster\_arn) | ARN that identifies the cluster. |
| [cluster\_id](#output\_cluster\_id) | Identifier of the ECS Cluster |
| [cluster\_name](#output\_cluster\_name) | Name of the ECS Cluster |