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
Copy file name to clipboardExpand all lines: README.md
+53-47Lines changed: 53 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# terraform-aws-alb
2
2
3
3
A Terraform module containing common configurations for an AWS Application Load
4
-
Balancer (ALB) running over HTTP/HTTPS. Available through the [terraform registry](https://registry.terraform.io/modules/terraform-aws-modules/alb/aws).
4
+
Balancer (ALB) running over HTTP/HTTPS. Available through the [Terraform registry](https://registry.terraform.io/modules/terraform-aws-modules/alb/aws).
@@ -31,11 +31,11 @@ to the ASG immediately or will result in failure. The value of `target_group[n][
31
31
32
32
## Why ALB instead of ELB
33
33
34
-
The use-case presented here appears almost identical to how one would use an ELB
35
-
but we inherit a few bonuses by moving to ALB like the ability to leverage WAF.
34
+
ALB has the ability to replace what several ELBs can do by routing based on URI matchers.
35
+
Additionally, operating at layer 7 opens the ability to shape traffic using WAF.
36
36
[AWS's documentation](https://aws.amazon.com/elasticloadbalancing/applicationloadbalancer/) has a more
37
37
exhaustive set of reasons. Alternatively, if using ALB with ECS look no further than
38
-
the [Hashicorp example](https://github.com/terraform-providers/terraform-provider-aws/blob/master/examples/ecs-alb).
38
+
the [HashiCorp example](https://github.com/terraform-providers/terraform-provider-aws/blob/master/examples/ecs-alb).
39
39
40
40
## Usage example
41
41
@@ -60,7 +60,52 @@ module "alb" {
60
60
}
61
61
```
62
62
63
-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
63
+
## Testing
64
+
65
+
This module has been packaged with [awspec](https://github.com/k1LoW/awspec) tests through [kitchen](https://kitchen.ci/) and [kitchen-terraform](https://newcontext-oss.github.io/kitchen-terraform/). To run them:
66
+
67
+
1. Install [rvm](https://rvm.io/rvm/install) and the ruby version specified in the [Gemfile](https://github.com/terraform-aws-modules/terraform-aws-alb/tree/master/Gemfile).
68
+
2. Install bundler and the gems from our Gemfile:
69
+
70
+
```bash
71
+
gem install bundler && bundle install
72
+
```
73
+
74
+
3. Ensure your AWS environment is configured (i.e. credentials and region) fortest and set TF_VAR_region to a valid AWS region (e.g. `export TF_VAR_region=${AWS_REGION}`).
75
+
4. Test using `bundle exec kitchen test` from the root of the repo.
76
+
77
+
## Doc generation
78
+
79
+
Documentation should be modified within `main.tf` and generated using [terraform-docs](https://github.com/segmentio/terraform-docs).
Report issues/questions/feature requests on in the [issues](https://github.com/terraform-aws-modules/terraform-aws-alb/issues/new) section.
89
+
90
+
Full contributing [guidelines are covered here](https://github.com/terraform-aws-modules/terraform-aws-alb/blob/master/CONTRIBUTING.md).
91
+
92
+
## IAM Permissions
93
+
94
+
Testing and using this repo requires a minimum set of IAM permissions. Test permissions
95
+
are listed in the [alb_test_fixture README](https://github.com/terraform-aws-modules/terraform-aws-alb/tree/master/examples/alb_test_fixture/README.md).
96
+
97
+
## Change log
98
+
99
+
The [changelog](https://github.com/terraform-aws-modules/terraform-aws-alb/tree/master/CHANGELOG.md) captures all important release notes.
100
+
101
+
## Authors
102
+
103
+
Created and maintained by [Brandon O'Connor](https://github.com/brandoconnor) - [email protected].
104
+
Many thanks to [the contributors listed here](https://github.com/terraform-aws-modules/terraform-aws-alb/graphs/contributors)!
105
+
106
+
## License
107
+
108
+
MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-aws-alb/tree/master/LICENSE) for full details.
64
109
65
110
## Inputs
66
111
@@ -76,14 +121,15 @@ module "alb" {
76
121
| https_listeners_count | A manually provided count/length of the https_listeners list of maps since the list cannot be computed. | string | `0` | no |
77
122
| idle_timeout | The time in seconds that the connection is allowed to be idle. | string | `60` | no |
78
123
| ip_address_type | The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 and dualstack. | string | `ipv4` | no |
79
-
| listener_ssl_policy_default | The security policy if using HTTPS externally on the load balancer. See: https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-policy-table.html| string |`ELBSecurityPolicy-2016-08`| no |
124
+
| listener_ssl_policy_default | The security policy if using HTTPS externally on the load balancer. [See](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-policy-table.html). | string | `ELBSecurityPolicy-2016-08` | no |
80
125
| load_balancer_create_timeout | Timeout value when creating the ALB. | string | `10m` | no |
81
126
| load_balancer_delete_timeout | Timeout value when deleting the ALB. | string | `10m` | no |
82
127
| load_balancer_is_internal | Boolean determining if the load balancer is internal or externally facing. | string | `false` | no |
83
128
| load_balancer_name | The resource name and Name tag of the load balancer. | string | - | yes |
84
129
| load_balancer_update_timeout | Timeout value when updating the ALB. | string | `10m` | no |
| log_bucket_name | S3 bucket (externally created) for storing load balancer access logs. Required if logging_enabled is true. | string | `` | no |
86
131
| log_location_prefix | S3 prefix within the log_bucket_name under which logs are stored. | string | `` | no |
132
+
| logging_enabled | Controls if the ALB will log requests to S3. | string | `true` | no |
87
133
| security_groups | The security groups to attach to the load balancer. e.g. ["sg-edcd9784","sg-edcd9785"] | list | - | yes |
88
134
| subnets | A list of subnets to associate with the load balancer. e.g. ['subnet-1a2b3c4d','subnet-1a2b3c4e','subnet-1a2b3c4f'] | list | - | yes |
89
135
| tags | A map of tags to add to all resources | string | `<map>` | no |
@@ -107,43 +153,3 @@ module "alb" {
107
153
| target_group_arn_suffixes | ARN suffixes of our target groups - can be used with CloudWatch. |
108
154
| target_group_arns | ARNs of the target groups. Useful for passing to your Auto Scaling group. |
109
155
| target_group_names | Name of the target group. Useful for passing to your CodeDeploy Deployment Group. |
110
-
111
-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
112
-
113
-
## Testing
114
-
115
-
This module has been packaged with [awspec](https://github.com/k1LoW/awspec) tests through [kitchen](https://kitchen.ci/) and [kitchen-terraform](https://newcontext-oss.github.io/kitchen-terraform/). To run them:
116
-
117
-
1. Install [rvm](https://rvm.io/rvm/install) and the ruby version specified in the [Gemfile](https://github.com/terraform-aws-modules/terraform-aws-alb/tree/master/Gemfile).
118
-
2. Install bundler and the gems from our Gemfile:
119
-
120
-
```bash
121
-
gem install bundler && bundle install
122
-
```
123
-
124
-
3. Ensure your AWS environment is configured (i.e. credentials and region) fortest and set TF_VAR_region to a valid AWS region (e.g. `export TF_VAR_region=${AWS_REGION}`).
125
-
4. Test using `bundle exec kitchen test` from the root of the repo.
126
-
127
-
## Contributing
128
-
129
-
Report issues/questions/feature requests on in the [issues](https://github.com/terraform-aws-modules/terraform-aws-alb/issues/new) section.
130
-
131
-
Full contributing [guidelines are covered here](https://github.com/terraform-aws-modules/terraform-aws-alb/blob/master/CONTRIBUTING.md).
132
-
133
-
## IAM Permissions
134
-
135
-
Testing and using this repo requires a minimum set of IAM permissions. Test permissions
136
-
are listed in the [alb_test_fixture README](https://github.com/terraform-aws-modules/terraform-aws-alb/tree/master/examples/alb_test_fixture/README.md).
137
-
138
-
## Change log
139
-
140
-
The [changelog](https://github.com/terraform-aws-modules/terraform-aws-alb/tree/master/CHANGELOG.md) captures all important release notes.
141
-
142
-
## Authors
143
-
144
-
Created and maintained by [Brandon O'Connor](https://github.com/brandoconnor) - [email protected].
145
-
Many thanks to [the contributors listed here](https://github.com/terraform-aws-modules/terraform-aws-alb/graphs/contributors)!
146
-
147
-
## License
148
-
149
-
MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-aws-alb/tree/master/LICENSE) for full details.
0 commit comments