Skip to content

Commit 502a14c

Browse files
committed
docs(examples/complete): update description and add example tfvars
1 parent dd72035 commit 502a14c

File tree

1 file changed

+57
-7
lines changed

1 file changed

+57
-7
lines changed

examples/complete/README.md

+57-7
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,59 @@
44
Configuration in this directory creates:
55

66
- ECS Service in a pre-configured ECS Cluster and corresponding ECS Capacity Providers
7-
- Internet-facing Application Load Balancer to access the deployed services, and
8-
- ACM to generate an Amazon-issued certificate for a base domain, set up Route53 Records for Certificate validation, and then create a Route53 A-type record with an endpoint
7+
- Internet-facing Application Load Balancer to access the deployed services with S3 bucket for storing access and connection logs, and
8+
- ACM to generate and validate an Amazon-issued certificate for a base domain
9+
10+
## Example `tfvars` Configuration
11+
12+
```tf
13+
vpc_id = "vpc-0123456789abcdefg"
14+
service_network_configuration_security_groups = ["sg-0123456789abcdefg"]
15+
private_subnets = ["subnet-0123456789abcdefg", "subnet-0123456789abcdefg"]
16+
public_subnets = ["subnet-0123456789abcdefg", "subnet-0123456789abcdefg"]
17+
18+
cluster_name = "your-cluster-name"
19+
container_name = "your-container-name"
20+
service_desired_count = 123
21+
container_image = "your-container-image:version"
22+
container_port = 123
23+
container_cpu = 123
24+
container_memory = 123
25+
container_essential = true
26+
container_port_mappings = [
27+
{
28+
name = "your-port-mapping-name"
29+
containerPort = 123
30+
hostPort = 123
31+
protocol = "your-port-mapping-protocol"
32+
}
33+
]
34+
container_readonly_root_filesystem = false
35+
36+
asg_arn = "arn:aws:autoscaling:your-region:01234567890:autoScalingGroup:abcdefgh-ijkl-mnop-qrst-uvwxyz012345:autoScalingGroupName/your-autoscaling-group-name"
37+
capacity_provider_name = "your-capacity-provider-name"
38+
capacity_provider_managed_scaling = {
39+
status = "ENABLED"
40+
target_capacity = 123
41+
minimum_scaling_step_size = 123
42+
maximum_scaling_step_size = 123
43+
}
44+
45+
alb_name = "your-alb-name"
46+
target_group_name = "your-alb-target-group-name"
47+
target_group_protocol = "HTTP"
48+
target_group_health_check = {
49+
path = "/path/to/health/check"
50+
}
51+
listener_port = 123
52+
ssl_policy = "ELBSecurityPolicy-TLS13-1-2-2021-06"
53+
security_group_alb = "your-alb-sg-name"
54+
55+
s3_bucket_force_destroy = true
56+
57+
base_domain = "example.com"
58+
domain_name = "your-service.example.com"
59+
```
960

1061
## Usage
1162

@@ -29,7 +80,7 @@ Please note that this example may create resources that can incur monetary charg
2980

3081
| Name | Version |
3182
|------|---------|
32-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.58.0 |
83+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.62.0 |
3384

3485
## Modules
3586

@@ -41,8 +92,6 @@ Please note that this example may create resources that can incur monetary charg
4192

4293
| Name | Type |
4394
|------|------|
44-
| [aws_acm_certificate_validation.base_domain_certificate](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate_validation) | resource |
45-
| [aws_route53_record.endpoint](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
4695
| [aws_security_group.alb_allow_all](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
4796
| [aws_route53_zone.base_domain](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route53_zone) | data source |
4897

@@ -52,7 +101,7 @@ Please note that this example may create resources that can incur monetary charg
52101
|------|-------------|------|---------|:--------:|
53102
| <a name="input_alb_name"></a> [alb\_name](#input\_alb\_name) | Name of the application load balancer | `string` | n/a | yes |
54103
| <a name="input_asg_arn"></a> [asg\_arn](#input\_asg\_arn) | ARN of the Auto Scaling group | `string` | n/a | yes |
55-
| <a name="input_base_domain"></a> [base\_domain](#input\_base\_domain) | Base domain name for ACM | `string` | n/a | yes |
104+
| <a name="input_base_domain"></a> [base\_domain](#input\_base\_domain) | Base domain for ACM | `string` | n/a | yes |
56105
| <a name="input_capacity_provider_managed_scaling"></a> [capacity\_provider\_managed\_scaling](#input\_capacity\_provider\_managed\_scaling) | Managed scaling configuration for the Capacity Provider | `any` | n/a | yes |
57106
| <a name="input_capacity_provider_name"></a> [capacity\_provider\_name](#input\_capacity\_provider\_name) | Name of the Capacity Provider | `string` | n/a | yes |
58107
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of the ECS cluster | `string` | n/a | yes |
@@ -64,10 +113,11 @@ Please note that this example may create resources that can incur monetary charg
64113
| <a name="input_container_port"></a> [container\_port](#input\_container\_port) | Port on which the container will listen | `number` | n/a | yes |
65114
| <a name="input_container_port_mappings"></a> [container\_port\_mappings](#input\_container\_port\_mappings) | Port mappings for the container | `any` | n/a | yes |
66115
| <a name="input_container_readonly_root_filesystem"></a> [container\_readonly\_root\_filesystem](#input\_container\_readonly\_root\_filesystem) | Whether the root filesystem is readonly for the container | `bool` | n/a | yes |
67-
| <a name="input_endpoint"></a> [endpoint](#input\_endpoint) | DNS endpoint for the application | `string` | n/a | yes |
116+
| <a name="input_domain_name"></a> [domain\_name](#input\_domain\_name) | Domain name for ACM | `string` | n/a | yes |
68117
| <a name="input_listener_port"></a> [listener\_port](#input\_listener\_port) | Port for the ALB listener | `number` | n/a | yes |
69118
| <a name="input_private_subnets"></a> [private\_subnets](#input\_private\_subnets) | List of private subnet IDs | `list(string)` | n/a | yes |
70119
| <a name="input_public_subnets"></a> [public\_subnets](#input\_public\_subnets) | List of public subnet IDs | `list(string)` | n/a | yes |
120+
| <a name="input_s3_bucket_force_destroy"></a> [s3\_bucket\_force\_destroy](#input\_s3\_bucket\_force\_destroy) | (Optional, Default:false) Boolean that indicates all objects (including any locked objects) should be deleted from the bucket when the bucket is destroyed so that the bucket can be destroyed without error. | `bool` | n/a | yes |
71121
| <a name="input_security_group_alb"></a> [security\_group\_alb](#input\_security\_group\_alb) | Name of the security group for ALB | `string` | n/a | yes |
72122
| <a name="input_service_desired_count"></a> [service\_desired\_count](#input\_service\_desired\_count) | Desired count for the ECS Service | `number` | n/a | yes |
73123
| <a name="input_service_network_configuration_security_groups"></a> [service\_network\_configuration\_security\_groups](#input\_service\_network\_configuration\_security\_groups) | Security Groups for the ECS Service's Network Configuration | `list(string)` | n/a | yes |

0 commit comments

Comments
 (0)