Skip to content

Commit 4929c22

Browse files
nitrocodeostermanactions-bot
authored
Add enabled variable (cloudposse#27)
* Add enabled variable * Updated README.md * Added test from terraform-aws-alb * Update fixtures.us-east-2.tfvars * Update examples_complete_test.go Co-authored-by: Erik Osterman <[email protected]> Co-authored-by: actions-bot <[email protected]>
1 parent 09c8956 commit 4929c22

File tree

7 files changed

+185
-123
lines changed

7 files changed

+185
-123
lines changed

README.md

+67-50
Original file line numberDiff line numberDiff line change
@@ -192,64 +192,81 @@ Available targets:
192192
lint Lint terraform code
193193
194194
```
195+
## Requirements
196+
197+
| Name | Version |
198+
|------|---------|
199+
| terraform | ~> 0.12.0 |
200+
| aws | ~> 2.0 |
201+
| local | ~> 1.3 |
202+
| null | ~> 2.0 |
203+
| template | ~> 2.0 |
204+
205+
## Providers
206+
207+
| Name | Version |
208+
|------|---------|
209+
| aws | ~> 2.0 |
210+
195211
## Inputs
196212

197213
| Name | Description | Type | Default | Required |
198-
|------|-------------|:----:|:-----:|:-----:|
199-
| attributes | Additional attributes (_e.g._ "1") | list(string) | `<list>` | no |
200-
| authenticated_hosts | Authenticated hosts to match in Hosts header | list(string) | `<list>` | no |
201-
| authenticated_listener_arns | A list of authenticated ALB listener ARNs to attach ALB listener rules to | list(string) | `<list>` | no |
202-
| authenticated_listener_arns_count | The number of authenticated ARNs in `authenticated_listener_arns`. This is necessary to work around a limitation in Terraform where counts cannot be computed | number | `0` | no |
203-
| authenticated_paths | Authenticated path pattern to match (a maximum of 1 can be defined) | list(string) | `<list>` | no |
204-
| authenticated_priority | The priority for the rules with authentication, between 1 and 50000 (1 being highest priority). Must be different from `unauthenticated_priority` since a listener can't have multiple rules with the same priority | number | `300` | no |
205-
| authentication_cognito_user_pool_arn | Cognito User Pool ARN | string | `` | no |
206-
| authentication_cognito_user_pool_client_id | Cognito User Pool Client ID | string | `` | no |
207-
| authentication_cognito_user_pool_domain | Cognito User Pool Domain. The User Pool Domain should be set to the domain prefix (`xxx`) instead of full domain (https://xxx.auth.us-west-2.amazoncognito.com) | string | `` | no |
208-
| authentication_oidc_authorization_endpoint | OIDC Authorization Endpoint | string | `` | no |
209-
| authentication_oidc_client_id | OIDC Client ID | string | `` | no |
210-
| authentication_oidc_client_secret | OIDC Client Secret | string | `` | no |
211-
| authentication_oidc_issuer | OIDC Issuer | string | `` | no |
212-
| authentication_oidc_token_endpoint | OIDC Token Endpoint | string | `` | no |
213-
| authentication_oidc_user_info_endpoint | OIDC User Info Endpoint | string | `` | no |
214-
| authentication_type | Authentication type. Supported values are `COGNITO` and `OIDC` | string | `` | no |
215-
| default_target_group_enabled | Enable/disable creation of the default target group | bool | `true` | no |
216-
| delimiter | Delimiter between `namespace`, `stage`, `name` and `attributes` | string | `-` | no |
217-
| deregistration_delay | The amount of time to wait in seconds while deregistering target | number | `15` | no |
218-
| health_check_enabled | Indicates whether health checks are enabled. Defaults to `true` | bool | `true` | no |
219-
| health_check_healthy_threshold | The number of consecutive health checks successes required before healthy | number | `2` | no |
220-
| health_check_interval | The duration in seconds in between health checks | number | `15` | no |
221-
| health_check_matcher | The HTTP response codes to indicate a healthy check | string | `200-399` | no |
222-
| health_check_path | The destination for the health check request | string | `/` | no |
223-
| health_check_port | The port to use to connect with the target. Valid values are either ports 1-65536, or `traffic-port`. Defaults to `traffic-port` | string | `traffic-port` | no |
224-
| health_check_protocol | The protocol to use to connect with the target. Defaults to `HTTP`. Not applicable when `target_type` is `lambda` | string | `HTTP` | no |
225-
| health_check_timeout | The amount of time to wait in seconds before failing a health check request | number | `10` | no |
226-
| health_check_unhealthy_threshold | The number of consecutive health check failures required before unhealthy | number | `2` | no |
227-
| name | Name of the application | string | - | yes |
228-
| namespace | Namespace (e.g. `eg` or `cp`) | string | `` | no |
229-
| port | The port for the created ALB target group (if `target_group_arn` is not set) | number | `80` | no |
230-
| protocol | The protocol for the created ALB target group (if `target_group_arn` is not set) | string | `HTTP` | no |
231-
| slow_start | The amount of time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is `0` seconds | number | `0` | no |
232-
| stage | Stage (e.g. `prod`, `dev`, `staging`) | string | `` | no |
233-
| stickiness_cookie_duration | The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds) | number | `86400` | no |
234-
| stickiness_enabled | Boolean to enable / disable `stickiness`. Default is `true` | bool | `true` | no |
235-
| stickiness_type | The type of sticky sessions. The only current possible value is `lb_cookie` | string | `lb_cookie` | no |
236-
| tags | Additional tags (_e.g._ { BusinessUnit : ABC }) | map(string) | `<map>` | no |
237-
| target_group_arn | Existing ALB target group ARN. If provided, set `default_target_group_enabled` to `false` to disable creation of the default target group | string | `` | no |
238-
| target_type | The type (`instance`, `ip` or `lambda`) of targets that can be registered with the target group | string | `ip` | no |
239-
| unauthenticated_hosts | Unauthenticated hosts to match in Hosts header | list(string) | `<list>` | no |
240-
| unauthenticated_listener_arns | A list of unauthenticated ALB listener ARNs to attach ALB listener rules to | list(string) | `<list>` | no |
241-
| unauthenticated_listener_arns_count | The number of unauthenticated ARNs in `unauthenticated_listener_arns`. This is necessary to work around a limitation in Terraform where counts cannot be computed | number | `0` | no |
242-
| unauthenticated_paths | Unauthenticated path pattern to match (a maximum of 1 can be defined) | list(string) | `<list>` | no |
243-
| unauthenticated_priority | The priority for the rules without authentication, between 1 and 50000 (1 being highest priority). Must be different from `authenticated_priority` since a listener can't have multiple rules with the same priority | number | `100` | no |
244-
| vpc_id | The VPC ID where generated ALB target group will be provisioned (if `target_group_arn` is not set) | string | - | yes |
214+
|------|-------------|------|---------|:--------:|
215+
| attributes | Additional attributes (\_e.g.\_ "1") | `list(string)` | `[]` | no |
216+
| authenticated\_hosts | Authenticated hosts to match in Hosts header | `list(string)` | `[]` | no |
217+
| authenticated\_listener\_arns | A list of authenticated ALB listener ARNs to attach ALB listener rules to | `list(string)` | `[]` | no |
218+
| authenticated\_listener\_arns\_count | The number of authenticated ARNs in `authenticated_listener_arns`. This is necessary to work around a limitation in Terraform where counts cannot be computed | `number` | `0` | no |
219+
| authenticated\_paths | Authenticated path pattern to match (a maximum of 1 can be defined) | `list(string)` | `[]` | no |
220+
| authenticated\_priority | The priority for the rules with authentication, between 1 and 50000 (1 being highest priority). Must be different from `unauthenticated_priority` since a listener can't have multiple rules with the same priority | `number` | `300` | no |
221+
| authentication\_cognito\_user\_pool\_arn | Cognito User Pool ARN | `string` | `""` | no |
222+
| authentication\_cognito\_user\_pool\_client\_id | Cognito User Pool Client ID | `string` | `""` | no |
223+
| authentication\_cognito\_user\_pool\_domain | Cognito User Pool Domain. The User Pool Domain should be set to the domain prefix (`xxx`) instead of full domain (https://xxx.auth.us-west-2.amazoncognito.com) | `string` | `""` | no |
224+
| authentication\_oidc\_authorization\_endpoint | OIDC Authorization Endpoint | `string` | `""` | no |
225+
| authentication\_oidc\_client\_id | OIDC Client ID | `string` | `""` | no |
226+
| authentication\_oidc\_client\_secret | OIDC Client Secret | `string` | `""` | no |
227+
| authentication\_oidc\_issuer | OIDC Issuer | `string` | `""` | no |
228+
| authentication\_oidc\_token\_endpoint | OIDC Token Endpoint | `string` | `""` | no |
229+
| authentication\_oidc\_user\_info\_endpoint | OIDC User Info Endpoint | `string` | `""` | no |
230+
| authentication\_type | Authentication type. Supported values are `COGNITO` and `OIDC` | `string` | `""` | no |
231+
| default\_target\_group\_enabled | Enable/disable creation of the default target group | `bool` | `true` | no |
232+
| delimiter | Delimiter between `namespace`, `stage`, `name` and `attributes` | `string` | `"-"` | no |
233+
| deregistration\_delay | The amount of time to wait in seconds while deregistering target | `number` | `15` | no |
234+
| enabled | Set to false to prevent the module from creating any resources | `bool` | `true` | no |
235+
| health\_check\_enabled | Indicates whether health checks are enabled. Defaults to `true` | `bool` | `true` | no |
236+
| health\_check\_healthy\_threshold | The number of consecutive health checks successes required before healthy | `number` | `2` | no |
237+
| health\_check\_interval | The duration in seconds in between health checks | `number` | `15` | no |
238+
| health\_check\_matcher | The HTTP response codes to indicate a healthy check | `string` | `"200-399"` | no |
239+
| health\_check\_path | The destination for the health check request | `string` | `"/"` | no |
240+
| health\_check\_port | The port to use to connect with the target. Valid values are either ports 1-65536, or `traffic-port`. Defaults to `traffic-port` | `string` | `"traffic-port"` | no |
241+
| health\_check\_protocol | The protocol to use to connect with the target. Defaults to `HTTP`. Not applicable when `target_type` is `lambda` | `string` | `"HTTP"` | no |
242+
| health\_check\_timeout | The amount of time to wait in seconds before failing a health check request | `number` | `10` | no |
243+
| health\_check\_unhealthy\_threshold | The number of consecutive health check failures required before unhealthy | `number` | `2` | no |
244+
| name | Name of the application | `string` | n/a | yes |
245+
| namespace | Namespace (e.g. `eg` or `cp`) | `string` | `""` | no |
246+
| port | The port for the created ALB target group (if `target_group_arn` is not set) | `number` | `80` | no |
247+
| protocol | The protocol for the created ALB target group (if `target_group_arn` is not set) | `string` | `"HTTP"` | no |
248+
| slow\_start | The amount of time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is `0` seconds | `number` | `0` | no |
249+
| stage | Stage (e.g. `prod`, `dev`, `staging`) | `string` | `""` | no |
250+
| stickiness\_cookie\_duration | The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds) | `number` | `86400` | no |
251+
| stickiness\_enabled | Boolean to enable / disable `stickiness`. Default is `true` | `bool` | `true` | no |
252+
| stickiness\_type | The type of sticky sessions. The only current possible value is `lb_cookie` | `string` | `"lb_cookie"` | no |
253+
| tags | Additional tags (\_e.g.\_ { BusinessUnit : ABC }) | `map(string)` | `{}` | no |
254+
| target\_group\_arn | Existing ALB target group ARN. If provided, set `default_target_group_enabled` to `false` to disable creation of the default target group | `string` | `""` | no |
255+
| target\_type | The type (`instance`, `ip` or `lambda`) of targets that can be registered with the target group | `string` | `"ip"` | no |
256+
| unauthenticated\_hosts | Unauthenticated hosts to match in Hosts header | `list(string)` | `[]` | no |
257+
| unauthenticated\_listener\_arns | A list of unauthenticated ALB listener ARNs to attach ALB listener rules to | `list(string)` | `[]` | no |
258+
| unauthenticated\_listener\_arns\_count | The number of unauthenticated ARNs in `unauthenticated_listener_arns`. This is necessary to work around a limitation in Terraform where counts cannot be computed | `number` | `0` | no |
259+
| unauthenticated\_paths | Unauthenticated path pattern to match (a maximum of 1 can be defined) | `list(string)` | `[]` | no |
260+
| unauthenticated\_priority | The priority for the rules without authentication, between 1 and 50000 (1 being highest priority). Must be different from `authenticated_priority` since a listener can't have multiple rules with the same priority | `number` | `100` | no |
261+
| vpc\_id | The VPC ID where generated ALB target group will be provisioned (if `target_group_arn` is not set) | `string` | n/a | yes |
245262

246263
## Outputs
247264

248265
| Name | Description |
249266
|------|-------------|
250-
| target_group_arn | ALB Target Group ARN |
251-
| target_group_arn_suffix | ALB Target Group ARN suffix |
252-
| target_group_name | ALB Target Group name |
267+
| target\_group\_arn | ALB Target Group ARN |
268+
| target\_group\_arn\_suffix | ALB Target Group ARN suffix |
269+
| target\_group\_name | ALB Target Group name |
253270

254271

255272

0 commit comments

Comments
 (0)