Skip to content

Commit 3f3d442

Browse files
committed
docs(modules): add description, preset variables info, and additional notes
1 parent 2e9bc3f commit 3f3d442

File tree

3 files changed

+83
-0
lines changed

3 files changed

+83
-0
lines changed

modules/acm/.header.md

+11
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
11
# acm
2+
3+
This sub-module creates the Amazon-issued certificates for given domains with `validation_option` configuration.
4+
5+
## Presets
6+
7+
- The `validation_method` is set to `DNS` as the recommended method, and can be overridden to use `EMAIL` method if required.
8+
9+
## Notes
10+
11+
- ACM certificates are created before destroying existing ones (to update the configuration), which is the recommended practice.
12+
- The sub-module outputs the corresponding validation records for every Amazon-issued ACM certificate created. This can be further used to complete the validation by creating the Route53 DNS records.

modules/alb/.header.md

+51
Original file line numberDiff line numberDiff line change
@@ -1 +1,52 @@
11
# alb
2+
3+
This sub-module creates:
4+
5+
1. Application Load Balancer in the given subnets
6+
2. Target Groups with Health Check configuration
7+
3. Listeners with Default Action configuration, and
8+
4. Listener Rules with Actions with `forward` and `authenticate-oidc` types, and Conditions involving `host_header`, `path_pattern`, and `http_request_method`.
9+
10+
## Presets
11+
12+
### Load Balancer
13+
14+
- The `internal` is set to `false` as the default option (i.e., an Internet-facing ALB), and can be overridden to be internal if required.
15+
- The `preserve_host_header` is set to `true` as the default option (i.e., the `HOST` header is not overridden by the ALB), and can be overridden to allow the ALB to override the header if required.
16+
- The `enable_deletion_protection` is set to `false` as the recommended option (i.e., the ALB can be destroyed using the API), and can be overridden to enable the deletion protection if required.
17+
18+
### Listener
19+
20+
- The `protocol` is set to `HTTP` as the default option, and can be overridden to use `HTTPS` if required.
21+
- The `ssl_policy` is set to `ELBSecurityPolicy-TLS13-1-2-2021-06` as the recommended SSL policy ([read more](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies)), and can be overridden to use a different SSL policy if required.
22+
23+
## Notes
24+
25+
- For configuration that requires ARNs to other Target Groups/Listeners, the name of the Target Group/Listener can be specified as the value of the attribute, so that the sub-module implicitly references the corresponding Target Group/Listener for the ARN.
26+
27+
```hcl
28+
module "alb" {
29+
. . .
30+
31+
target_groups = {
32+
# Define the Target Group with a key
33+
nginx = {
34+
. . .
35+
}
36+
}
37+
38+
listeners = {
39+
. . .
40+
default_action = [
41+
{
42+
. . .
43+
44+
# Reference the target group using the key
45+
target_group = "nginx"
46+
}
47+
]
48+
}
49+
}
50+
```
51+
52+
- Listener Rule Actions currently support the `forward` and `authenticate-oidc` types only, and will be expanded to cover other types in future iteratively. Similarly, the Listener Rule Conditions currently support the `host_header`, `path_pattern` and `http_request_method` configurations only.

modules/capacity-provider/.header.md

+21
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
11
# capacity-provider
2+
3+
This sub-module creates:
4+
5+
1. ECS Capacity Providers with `auto_scaling_group_provider` configuration (optionally with `managed_scaling`), and
6+
2. ECS Cluster Capacity Providers using the created ECS Capacity Providers, and with `default_capacity_provider_strategy` configuration.
7+
8+
## Presets
9+
10+
### ECS Capacity Provider
11+
12+
- The `managed_termination_protection` is enabled by default as recommended (which enables termination protection to container instances), and can be disabled if required.
13+
14+
### ECS Cluster Capacity Providers
15+
16+
- The `default_auto_scaling_group_arn` is a required attribute, and is used as the default Autoscaling group ARN under `auto_scaling_group_provider` configuration under each ECS Capacity Provider. The `auto_scaling_group_arn` can be overridden for individual ECS Capacity Provider if required.
17+
- The `weight` under `default_capacity_provider_strategy` configuration is set to `1` as the default option (i.e., equal distribution of tasks in each ECS Capacity Provider), and can be overridden.
18+
- The `base` under `default_capacity_provider_strategy` configuration is set to `0` as the default option (i.e., min. number of tasks running in each ECS Capacity Provider), and can be overridden.
19+
20+
## Notes
21+
22+
- ECS Cluster Capacity Providers utilizes all the ECS Capacity Providers that were created through the sub-module as the desired behaviour, and cannot be overridden.

0 commit comments

Comments
 (0)