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
+83-83Lines changed: 83 additions & 83 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
Terraform AWS ALB
8
8
</h1>
9
9
10
-
<palign="center"style="font-size: 1.2rem;">
10
+
<palign="center"style="font-size: 1.2rem;">
11
11
This terraform module is used to create ALB on AWS.
12
12
</p>
13
13
@@ -38,7 +38,7 @@
38
38
<hr>
39
39
40
40
41
-
We eat, drink, sleep and most importantly love **DevOps**. We are working towards stratergies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.
41
+
We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.
42
42
43
43
This module is basically combination of [Terraform open source](https://www.terraform.io/) and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself.
44
44
@@ -49,7 +49,7 @@ We have [*fifty plus terraform modules*][terraform_modules]. A few of them are c
@@ -105,75 +104,76 @@ Here is an example of how you can use this module in your inventory structure:
105
104
106
105
| Name | Description | Type | Default | Required |
107
106
|------|-------------|:----:|:-----:|:-----:|
108
-
| access_logs | Access logs Enable or Disable. | bool |`false`| no |
109
-
| alb_environment | A mapping of tags to assign to the resource. | string | `` | no |
110
-
| alb_name | The name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, Terraform will autogenerate a name beginning with tf-lb. | string | `` | no |
111
-
| allocation_id | The allocation ID of the Elastic IP address. | string | `` | no |
112
-
| application | Application (e.g. `cd` or `clouddrove`). | string | `` | no |
113
-
| attributes | Additional attributes (e.g. `1`). | list |`<list>`| no |
114
-
| delimiter | Delimiter to be used between `organization`, `environment`, `name` and `attributes`. | string |`-`| no |
115
-
| deregistration_delay | The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds. | number |`300`| no |
116
-
| enable_cross_zone_load_balancing | Indicates whether cross zone load balancing should be enabled in application load balancers. | bool |`false`| no |
117
-
| enable_deletion_protection | If true, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer. Defaults to false. | string | `` | no |
118
-
| enable_http2 | Indicates whether HTTP/2 is enabled in application load balancers. | bool |`true`| no |
| health_check_healthy_threshold | The number of consecutive health checks successes required before considering an unhealthy target healthy. | number |`2`| no |
121
-
| health_check_interval | The duration in seconds in between health checks. | number |`15`| no |
122
-
| health_check_matcher | The HTTP response codes to indicate a healthy check. | string |`200-399`| no |
123
-
| health_check_path | The destination for the health check request. | string |`/`| no |
124
-
| health_check_timeout | The amount of time to wait in seconds before failing a health check request. | number |`10`| no |
125
-
| health_check_unhealthy_threshold | The number of consecutive health check failures required before considering the target unhealthy. | number |`2`| no |
126
-
| http_enabled | A boolean flag to enable/disable HTTP listener. | bool |`true`| no |
127
-
| http_listener_type | The type of routing action. Valid values are forward, redirect, fixed-response, authenticate-cognito and authenticate-oidc. | string |`redirect`| no |
128
-
| http_port | The port on which the load balancer is listening. like 80 or 443. | number |`80`| no |
129
-
| https_enabled | A boolean flag to enable/disable HTTPS listener. | bool |`true`| no |
130
-
| https_port | The port on which the load balancer is listening. like 80 or 443. | number | - | yes |
131
-
| idle_timeout | The time in seconds that the connection is allowed to be idle. | number |`60`| no |
132
-
| instance_count | The count of instances. | number |`0`| no |
133
-
| internal | If true, the LB will be internal. | string | `` | no |
134
-
| 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 |
135
-
| label_order | Label order, e.g. `name`,`application`. | list |`<list>`| no |
136
-
| listener_certificate_arn | The ARN of the SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. | string | `` | no |
137
-
| listener_protocol | The protocol for connections from clients to the load balancer. Valid values are TCP, HTTP and HTTPS. Defaults to HTTP. | string |`HTTPS`| no |
138
-
| listener_ssl_policy | 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 |
139
-
| listener_type | The type of routing action. Valid values are forward, redirect, fixed-response, authenticate-cognito and authenticate-oidc. | string | - | yes |
140
-
| load_balancer_create_timeout | Timeout value when creating the ALB. | string |`10m`| no |
141
-
| load_balancer_delete_timeout | Timeout value when deleting the ALB. | string |`10m`| no |
142
-
| load_balancer_type | The type of load balancer to create. Possible values are application or network. The default value is application. | string | `` | no |
143
-
| load_balancer_update_timeout | Timeout value when updating the ALB. | string |`10m`| no |
144
-
| log_bucket_name | S3 bucket (externally created) for storing load balancer access logs. Required if logging_enabled is true. | string | `` | no |
145
-
| name | Name (e.g. `app` or `cluster`). | string | `` | no |
146
-
| security_groups | A list of security group IDs to assign to the LB. Only valid for Load Balancers of type application. | list |`<list>`| no |
147
-
| status_code | The HTTP redirect code. The redirect is either permanent (HTTP_301) or temporary (HTTP_302). | string |`HTTP_301`| no |
148
-
| subnet_id | The id of the subnet of which to attach to the load balancer. You can specify only one subnet per Availability Zone. | string | `` | no |
107
+
| access\_logs | Access logs Enable or Disable. | bool |`"false"`| no |
108
+
| alb\_environment | A mapping of tags to assign to the resource. | string |`""`| no |
109
+
| alb\_name | The name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, Terraform will autogenerate a name beginning with tf-lb. | string |`""`| no |
110
+
| allocation\_id | The allocation ID of the Elastic IP address. | string |`""`| no |
111
+
| application | Application \(e.g. `cd` or `clouddrove`\). | string |`""`| no |
112
+
| attributes | Additional attributes \(e.g. `1`\). | list |`<list>`| no |
113
+
| delimiter | Delimiter to be used between `organization`, `environment`, `name` and `attributes`. | string |`"-"`| no |
114
+
| deregistration\_delay | The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds. | number |`"300"`| no |
115
+
| enable | If true, create alb. | bool |`"true"`| no |
116
+
| enable\_cross\_zone\_load\_balancing | Indicates whether cross zone load balancing should be enabled in application load balancers. | bool |`"false"`| no |
117
+
| enable\_deletion\_protection | If true, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer. Defaults to false. | string |`""`| no |
118
+
| enable\_http2 | Indicates whether HTTP/2 is enabled in application load balancers. | bool |`"true"`| no |
| health\_check\_healthy\_threshold | The number of consecutive health checks successes required before considering an unhealthy target healthy. | number |`"2"`| no |
121
+
| health\_check\_interval | The duration in seconds in between health checks. | number |`"15"`| no |
122
+
| health\_check\_matcher | The HTTP response codes to indicate a healthy check. | string |`"200-399"`| no |
123
+
| health\_check\_path | The destination for the health check request. | string |`"/"`| no |
124
+
| health\_check\_timeout | The amount of time to wait in seconds before failing a health check request. | number |`"10"`| no |
125
+
| health\_check\_unhealthy\_threshold | The number of consecutive health check failures required before considering the target unhealthy. | number |`"2"`| no |
126
+
| http\_enabled | A boolean flag to enable/disable HTTP listener. | bool |`"true"`| no |
127
+
| http\_listener\_type | The type of routing action. Valid values are forward, redirect, fixed-response, authenticate-cognito and authenticate-oidc. | string |`"redirect"`| no |
128
+
| http\_port | The port on which the load balancer is listening. like 80 or 443. | number |`"80"`| no |
129
+
| https\_enabled | A boolean flag to enable/disable HTTPS listener. | bool |`"true"`| no |
130
+
| https\_port | The port on which the load balancer is listening. like 80 or 443. | number | n/a | yes |
131
+
| idle\_timeout | The time in seconds that the connection is allowed to be idle. | number |`"60"`| no |
132
+
| instance\_count | The count of instances. | number |`"0"`| no |
133
+
| internal | If true, the LB will be internal. | string |`""`| no |
134
+
| 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 |
135
+
| label\_order | Label order, e.g. `name`,`application`. | list |`<list>`| no |
136
+
| listener\_certificate\_arn | The ARN of the SSL server certificate. Exactly one certificate is required if the protocol is HTTPS. | string |`""`| no |
137
+
| listener\_protocol | The protocol for connections from clients to the load balancer. Valid values are TCP, HTTP and HTTPS. Defaults to HTTP. | string |`"HTTPS"`| no |
138
+
| listener\_ssl\_policy | 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 |
139
+
| listener\_type | The type of routing action. Valid values are forward, redirect, fixed-response, authenticate-cognito and authenticate-oidc. | string | n/a | yes |
140
+
| load\_balancer\_create\_timeout | Timeout value when creating the ALB. | string |`"10m"`| no |
141
+
| load\_balancer\_delete\_timeout | Timeout value when deleting the ALB. | string |`"10m"`| no |
142
+
| load\_balancer\_type | The type of load balancer to create. Possible values are application or network. The default value is application. | string |`""`| no |
143
+
| load\_balancer\_update\_timeout | Timeout value when updating the ALB. | string |`"10m"`| no |
144
+
| log\_bucket\_name | S3 bucket \(externally created\) for storing load balancer access logs. Required if logging\_enabled is true. | string |`""`| no |
145
+
| name | Name \(e.g. `app` or `cluster`\). | string |`""`| no |
146
+
| security\_groups | A list of security group IDs to assign to the LB. Only valid for Load Balancers of type application. | list |`<list>`| no |
147
+
| status\_code | The HTTP redirect code. The redirect is either permanent \(HTTP\_301\) or temporary \(HTTP\_302\). | string |`"HTTP_301"`| no |
148
+
| subnet\_id | The id of the subnet of which to attach to the load balancer. You can specify only one subnet per Availability Zone. | string |`""`| no |
149
149
| subnets | A list of subnet IDs to attach to the LB. Subnets cannot be updated for Load Balancers of type network. Changing this value will for load balancers of type network will force a recreation of the resource. | list |`<list>`| no |
|target_group_port| The port on which targets receive traffic, unless overridden when registering a specific target. | string | `` | no |
152
-
|target_group_protocol| The protocol to use for routing traffic to the targets. | string | `` | no |
153
-
|target_id| The ID of the target. This is the Instance ID for an instance, or the container ID for an ECS container. If the target type is ip, specify an IP address. | list |-| yes |
154
-
|target_type| The type of target that you must specify when registering targets with this target group. The possible values are instance (targets are specified by instance ID) or ip (targets are specified by IP address) or lambda (targets are specified by lambda arn). The default is instance. | string |`instance`| no |
155
-
|vpc_id| The identifier of the VPC in which to create the target group. | string | `` | no |
|target\_group\_port| The port on which targets receive traffic, unless overridden when registering a specific target. | string |`""`| no |
152
+
|target\_group\_protocol| The protocol to use for routing traffic to the targets. | string |`""`| no |
153
+
|target\_id| The ID of the target. This is the Instance ID for an instance, or the container ID for an ECS container. If the target type is ip, specify an IP address. | list |n/a| yes |
154
+
|target\_type| The type of target that you must specify when registering targets with this target group. The possible values are instance \(targets are specified by instance ID\) or ip \(targets are specified by IP address\) or lambda \(targets are specified by lambda arn\). The default is instance. | string |`"instance"`| no |
155
+
|vpc\_id| The identifier of the VPC in which to create the target group. | string |`""`| no |
156
156
157
157
## Outputs
158
158
159
159
| Name | Description |
160
160
|------|-------------|
161
161
| arn | The ARN of the ALB. |
162
-
|arn_suffix| The ARN suffix of the ALB. |
163
-
|dns_name| DNS name of ALB. |
164
-
|http_listener_arn| The ARN of the HTTP listener. |
165
-
|https_listener_arn| The ARN of the HTTPS listener. |
166
-
|listener_arns| A list of all the listener ARNs. |
167
-
|main_target_group_arn| The main target group ARN. |
162
+
|arn\_suffix| The ARN suffix of the ALB. |
163
+
|dns\_name| DNS name of ALB. |
164
+
|http\_listener\_arn| The ARN of the HTTP listener. |
165
+
|https\_listener\_arn| The ARN of the HTTPS listener. |
166
+
|listener\_arns| A list of all the listener ARNs. |
167
+
|main\_target\_group\_arn| The main target group ARN. |
168
168
| name | The ARN suffix of the ALB. |
169
169
| tags | A mapping of tags to assign to the resource. |
170
-
|zone_id| The ID of the zone which ALB is provisioned. |
170
+
|zone\_id| The ID of the zone which ALB is provisioned. |
171
171
172
172
173
173
174
174
175
175
## Testing
176
-
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
176
+
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
177
177
178
178
You need to run the following command in the testing folder:
179
179
```hcl
@@ -182,7 +182,7 @@ You need to run the following command in the testing folder:
182
182
183
183
184
184
185
-
## Feedback
185
+
## Feedback
186
186
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/terraform-aws-alb/issues), or feel free to drop us an email at [hello@clouddrove.com](mailto:hello@clouddrove.com).
187
187
188
188
If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/terraform-aws-alb)!
@@ -200,4 +200,4 @@ At [CloudDrove][website], we offer expert guidance, implementation support and s
0 commit comments