Skip to content

Commit fb5e715

Browse files
committed
feat(examples): complete example
1 parent 21fa9a6 commit fb5e715

File tree

5 files changed

+585
-0
lines changed

5 files changed

+585
-0
lines changed

examples/complete/README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# ECS Deployment Complete
2+
3+
Configuration in this directory creates:
4+
5+
- VPC with two private subnets and two public subnets
6+
- Autoscaling Group with a Launch Template
7+
- ECS Service in a pre-configured ECS Cluster to spin up a Nginx web server, and corresponding ECS Capacity Providers
8+
- Internet-facing Application Load Balancer to access the internal Nginx server, and
9+
- ACM to generate an Amazon-issued certificate for a base domain, and then create a Route53 A-type record with an endpoint
10+
11+
## Usage
12+
13+
To run this example, you will need to execute the commands:
14+
15+
```bash
16+
terraform init
17+
terraform plan
18+
terraform apply
19+
```
20+
21+
Please note that this example may create resources that can incur monetary charges on your AWS bill. You can run `terraform destroy` when you no longer need the resources.
22+
23+
<!-- BEGIN_TF_DOCS -->
24+
## Requirements
25+
26+
| Name | Version |
27+
|------|---------|
28+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.6.0 |
29+
30+
## Providers
31+
32+
| Name | Version |
33+
|------|---------|
34+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.58.0 |
35+
36+
## Modules
37+
38+
| Name | Source | Version |
39+
|------|--------|---------|
40+
| <a name="module_acm"></a> [acm](#module\_acm) | ../../modules/acm | n/a |
41+
| <a name="module_alb"></a> [alb](#module\_alb) | ../../modules/alb | n/a |
42+
| <a name="module_asg"></a> [asg](#module\_asg) | ../../modules/asg | n/a |
43+
| <a name="module_capacity_provider"></a> [capacity\_provider](#module\_capacity\_provider) | ../../modules/capacity-provider | n/a |
44+
| <a name="module_ecs_deployment"></a> [ecs\_deployment](#module\_ecs\_deployment) | ../../ | n/a |
45+
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 5.9.0 |
46+
47+
## Resources
48+
49+
| Name | Type |
50+
|------|------|
51+
| [aws_acm_certificate_validation.base_domain_certificate](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate_validation) | resource |
52+
| [aws_route53_record.endpoint](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
53+
| [aws_security_group.alb_allow_all](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
54+
| [aws_security_group.allow_all_within_vpc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
55+
| [aws_security_group.allow_nginx_http_from_alb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
56+
| [aws_ami.ecs_optimized_amzn_linux](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source |
57+
| [aws_route53_zone.base_domain](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route53_zone) | data source |
58+
59+
## Inputs
60+
61+
No inputs.
62+
63+
## Outputs
64+
65+
| Name | Description |
66+
|------|-------------|
67+
| <a name="output_acm_amazon_issued_certificate_arn"></a> [acm\_amazon\_issued\_certificate\_arn](#output\_acm\_amazon\_issued\_certificate\_arn) | ARN of the ACM Amazon-issued certificate for the base domain |
68+
| <a name="output_alb_allow_all_sg_id"></a> [alb\_allow\_all\_sg\_id](#output\_alb\_allow\_all\_sg\_id) | ID of the Security Group for Application Load Balancer to allow all traffic from any source |
69+
| <a name="output_alb_arn"></a> [alb\_arn](#output\_alb\_arn) | ARN of the Application Load Balancer for Nginx ECS Service |
70+
| <a name="output_alb_id"></a> [alb\_id](#output\_alb\_id) | Identifier of the Application Load Balancer for Nginx ECS Service |
71+
| <a name="output_allow_all_within_vpc_sg_id"></a> [allow\_all\_within\_vpc\_sg\_id](#output\_allow\_all\_within\_vpc\_sg\_id) | ID of the Security Group to allow all traffic from any source within the VPC |
72+
| <a name="output_allow_nginx_http_from_alb_sg_id"></a> [allow\_nginx\_http\_from\_alb\_sg\_id](#output\_allow\_nginx\_http\_from\_alb\_sg\_id) | ID of the Security Group to allow all Nginx HTTP traffic from Application Load Balancer |
73+
| <a name="output_asg_arn"></a> [asg\_arn](#output\_asg\_arn) | ARN of the Autoscaling group |
74+
| <a name="output_asg_id"></a> [asg\_id](#output\_asg\_id) | Identifier of the Autoscaling group |
75+
| <a name="output_ecs_capacity_provider_arn"></a> [ecs\_capacity\_provider\_arn](#output\_ecs\_capacity\_provider\_arn) | ARN of the ECS Capacity Provider |
76+
| <a name="output_ecs_capacity_provider_id"></a> [ecs\_capacity\_provider\_id](#output\_ecs\_capacity\_provider\_id) | Identifier of the ECS Capacity Provider |
77+
| <a name="output_ecs_cluster_capacity_providers_id"></a> [ecs\_cluster\_capacity\_providers\_id](#output\_ecs\_cluster\_capacity\_providers\_id) | Identifier of the ECS Cluster Capacity Providers |
78+
| <a name="output_ecs_service_arn"></a> [ecs\_service\_arn](#output\_ecs\_service\_arn) | ARN of the ECS Service for Nginx |
79+
| <a name="output_iam_instance_profile_arn"></a> [iam\_instance\_profile\_arn](#output\_iam\_instance\_profile\_arn) | ARN of the IAM Instance Profile |
80+
| <a name="output_iam_instance_profile_id"></a> [iam\_instance\_profile\_id](#output\_iam\_instance\_profile\_id) | Identifier of the IAM Instance Profile |
81+
| <a name="output_iam_instance_role_id"></a> [iam\_instance\_role\_id](#output\_iam\_instance\_role\_id) | Identifier of the IAM Instance Role |
82+
| <a name="output_launch_template_arn"></a> [launch\_template\_arn](#output\_launch\_template\_arn) | ARN of the Launch Template |
83+
| <a name="output_launch_template_id"></a> [launch\_template\_id](#output\_launch\_template\_id) | Identifier of the Launch Template |
84+
| <a name="output_listener_arn"></a> [listener\_arn](#output\_listener\_arn) | ARN of the ALB Listener forwarding to Nginx instances |
85+
| <a name="output_listener_id"></a> [listener\_id](#output\_listener\_id) | Identifier of the ALB Listener forwarding to Nginx instances |
86+
| <a name="output_target_group_arn"></a> [target\_group\_arn](#output\_target\_group\_arn) | ARN of the Target Group for Nginx instances |
87+
| <a name="output_target_group_id"></a> [target\_group\_id](#output\_target\_group\_id) | Identifier of the Target Group for Nginx instances |
88+
| <a name="output_task_definition_arn"></a> [task\_definition\_arn](#output\_task\_definition\_arn) | ARN of the ECS Task Definition for Nginx |
89+
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | Identifier of the VPC |
90+
| <a name="output_vpc_private_subnets_arns"></a> [vpc\_private\_subnets\_arns](#output\_vpc\_private\_subnets\_arns) | ARNs of the Private Subnets in the VPC |
91+
| <a name="output_vpc_private_subnets_ids"></a> [vpc\_private\_subnets\_ids](#output\_vpc\_private\_subnets\_ids) | Identifiers of the Private Subnets in the VPC |
92+
| <a name="output_vpc_public_subnets_arns"></a> [vpc\_public\_subnets\_arns](#output\_vpc\_public\_subnets\_arns) | ARNs of the Public Subnets in the VPC |
93+
| <a name="output_vpc_public_subnets_ids"></a> [vpc\_public\_subnets\_ids](#output\_vpc\_public\_subnets\_ids) | Identifiers of the Public Subnets in the VPC |
94+
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)