You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SourceFuse's AWS Reference Architecture Terraform module leverages the terraform-aws-modules/terraform-aws-ecs GitHub repository to facilitate the deployment and management of an AWS ECS (Elastic Container Service) cluster. It streamlines the configuration of ECS tasks, services, and related components, providing a scalable and efficient solution for orchestrating containerized applications. With customizable settings for logging, load balancing, and service discovery, the module promotes seamless deployment and management of containerized workloads on AWS.
12
+
SourceFuse's AWS Reference Architecture Terraform module leverages the terraform-aws-modules/terraform-aws-ecs GitHub repository to facilitate the deployment and management of an AWS ECS (Elastic Container Service) cluster. It streamlines the configuration of ECS tasks, services, and related components, providing a scalable and efficient solution for orchestrating containerized applications. With customizable settings for loggingand load balancing the module promotes seamless deployment and management of containerized workloads on AWS.
13
13
14
14
The module assumes that upstream dependencies, namely networking dependencies, are created upstream and the values are passed into this module via mechanisms such as Terraform data source queries.
15
15
16
16

17
17
18
18
The module provisions
19
19
20
-
* ECS Cluster - we are focusing on the Fargate launch type, so we do not provision any underlying EC2 instances for the ECS launch type.
21
-
* Application Load Balancer - default port 80 to 443 redirect.
20
+
* ECS Cluster - we are focusing on the Fargate launch type, so we do not provision any underlying EC2 instances for the ECS launch type for the time being.
21
+
* Application Load Balancer - default port 80.
22
22
* Health Check Service - vanilla HTTP echo service that is used as the default target group for the load balancer. The purpose of the health check service is to ensure that the core infrastructure, networking, security groups, etc. are configured correctly.
23
23
* Task execution IAM role - used by downstream services for task execution.
24
-
* Utilizes ACM to generate a certificate specific to the ALB.
25
-
* Tags/SSM params - the module tags resources and outputs SSM params that can be used in data source lookups downstream for ECS services to reference to deploy into the cluster.
24
+
* Tags - the module tags resources for easy reference in the AWS console.
| <aname="input_create_alb"></a> [create\_alb](#input\_create\_alb)|n/a|`bool`|`false`| no |
162
-
| <aname="input_create_service"></a> [create\_service](#input\_create\_service)|n/a|`bool`|`false`| no |
138
+
| <a name="input_capacity_provider"></a> [capacity\_provider](#input\_capacity\_provider) | Configuration settings for the ECS capacity providers, including the capacity providers used for autoscaling and Fargate. This variable defines the properties of each capacity provider and how they are managed, such as scaling policies and termination protection. | <pre>object({<br/> autoscaling_capacity_providers = map(object({<br/> name = optional(string)<br/> auto_scaling_group_arn = string<br/> managed_termination_protection = optional(string, "DISABLED")<br/> managed_draining = optional(string, "ENABLED")<br/> managed_scaling = optional(object({<br/> instance_warmup_period = optional(number)<br/> maximum_scaling_step_size = optional(number)<br/> minimum_scaling_step_size = optional(number)<br/> status = optional(string)<br/> target_capacity = optional(number)<br/> }))<br/> tags = optional(map(string), {})<br/> }))<br/> default_capacity_provider_use_fargate = bool<br/> fargate_capacity_providers = any<br/> })</pre> | n/a | yes |
139
+
| <aname="input_create_alb"></a> [create\_alb](#input\_create\_alb)|Flag to create or skip the creation of ALB|`bool`|`false`| no |
140
+
| <aname="input_create_service"></a> [create\_service](#input\_create\_service)|Flag to create or skip the creation of ECS demo service|`bool`|`false`| no |
163
141
| <a name="input_ecs_cluster"></a> [ecs\_cluster](#input\_ecs\_cluster) | The ECS-specific values to use such as cluster, service, and repository names.<br/><br/>Keys:<br/> - cluster\_name: The name of the ECS cluster.<br/> - cluster\_configuration: The execute command configuration for the cluster.<br/> - cluster\_settings: A list of cluster settings (e.g., container insights). Default is an empty list.<br/> - cluster\_service\_connect\_defaults: Configures a default Service Connect namespace.<br/> - create\_cloudwatch\_log\_group: Boolean flag to specify whether to create a CloudWatch log group for the ECS cluster. | <pre>object({<br/> name = string<br/> configuration = optional(object({<br/> execute_command_configuration = optional(object({<br/> kms_key_id = optional(string, "")<br/> logging = optional(string, "DEFAULT")<br/> log_configuration = optional(object({<br/> cloudwatch_encryption_enabled = optional(bool, null)<br/> log_group_name = optional(string, null)<br/> log_group_retention_in_days = optional(number, null)<br/> log_group_kms_key_id = optional(string, null)<br/> log_group_tags = optional(map(string), null)<br/> s3_bucket_name = optional(string, null)<br/> s3_bucket_encryption_enabled = optional(bool, null)<br/> s3_key_prefix = optional(string, null)<br/> }), {})<br/> }), {})<br/> }), {})<br/> create_cloudwatch_log_group = bool<br/> service_connect_defaults = optional(map(string), null)<br/> settings = optional(any, null)<br/> tags = optional(map(string), null)<br/> })</pre> | n/a | yes |
164
142
| <aname="input_ecs_service"></a> [ecs\_service](#input\_ecs\_service)| The ECS-specific values to use such as cluster, service, and repository names. | <pre>object({<br/> cluster_name = string<br/> service_name = string<br/> repository_name = string<br/> enable_load_balancer = bool<br/> aws_lb_target_group_name = optional(string)<br/> })</pre> | n/a | yes |
165
-
| <aname="input_environment"></a> [environment](#input\_environment)| The environment associated with the service |`string`| n/a | yes |
143
+
| <aname="input_environment"></a> [environment](#input\_environment)| The environment associated with the ECS service |`string`| n/a | yes |
| <aname="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id)|ID of VPC in which all resources need to be created|`string`| n/a | yes |
170
148
171
149
## Outputs
172
150
173
-
No outputs.
151
+
| Name | Description |
152
+
|------|-------------|
153
+
| <aname="output_alb_name"></a> [alb\_name](#output\_alb\_name)| The names of the ALBs. |
154
+
| <aname="output_ecs_cluster_configuration"></a> [ecs\_cluster\_configuration](#output\_ecs\_cluster\_configuration)| The configuration details of the ECS cluster. |
155
+
| <aname="output_ecs_cluster_name"></a> [ecs\_cluster\_name](#output\_ecs\_cluster\_name)| The name of the ECS cluster. |
156
+
| <aname="output_ecs_service_name"></a> [ecs\_service\_name](#output\_ecs\_service\_name)| The service names of the ECS services. |
157
+
| <aname="output_ecs_task_definition_arn"></a> [ecs\_task\_definition\_arn](#output\_ecs\_task\_definition\_arn)| The ARNs of the ECS task definitions. |
174
158
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
175
159
176
-
## SSM Parameters
177
-
There are some commonly referenced outputs generated by this module.
178
-
These outputs are also published to SSM for ease of access for downstream resources.
179
-
The default SSM Parameter format used by this module is the following:
180
-
```
181
-
[
182
-
## alb
183
-
{
184
-
name = "/${var.namespace}/${var.environment}/alb/${module.alb.alb_name}/endpoint"
185
-
value = module.alb.alb_dns_name
186
-
description = "ALB DNS Endpoint"
187
-
type = "String"
188
-
},
189
-
{
190
-
name = "/${var.namespace}/${var.environment}/alb/${module.alb.alb_name}/arn"
191
-
value = module.alb.alb_arn
192
-
description = "ALB ARN"
193
-
type = "String"
194
-
},
195
-
196
-
## ecs
197
-
{
198
-
name = "/${var.namespace}/${var.environment}/ecs/${module.ecs.cluster_name}/id"
199
-
value = module.ecs.cluster_id
200
-
description = "ECS Cluster ID"
201
-
type = "String"
202
-
},
203
-
{
204
-
name = "/${var.namespace}/${var.environment}/ecs/${module.ecs.cluster_name}/arn"
205
-
value = module.ecs.cluster_arn
206
-
description = "ECS Cluster ARN"
207
-
type = "String"
208
-
}
209
-
]
210
-
```
211
-
212
-
You can append to this array by adding values to `var.additional_ssm_params`.
0 commit comments