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
feat(variables): replace lookup with direct attribute access
Simplify attribute access in `main.tf` by replacing `lookup` calls with direct references to `each.value` properties. Updated `variables.tf` to define explicit object types, improving type safety and clarity for HTTP/HTTPS port variable definitions.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -93,10 +93,10 @@ In order to run all checks at any point run the following command:
93
93
| <aname="input_enable_s3_logs"></a> [enable\_s3\_logs](#input\_enable\_s3\_logs)| (Optional) If true, all LoadBalancer logs will be sent to S3. If true, and log\_bucket\_id is *not* provided, this module will create the bucket with other provided s3 bucket configuration options |`bool`|`true`| no |
94
94
| <aname="input_http_ingress_cidr_blocks"></a> [http\_ingress\_cidr\_blocks](#input\_http\_ingress\_cidr\_blocks)| List of CIDR blocks to allowed to access the Load Balancer through HTTP |`list(string)`| <pre>[<br/> "0.0.0.0/0"<br/>]</pre> | no |
95
95
| <aname="input_http_ingress_prefix_list_ids"></a> [http\_ingress\_prefix\_list\_ids](#input\_http\_ingress\_prefix\_list\_ids)| List of prefix list IDs blocks to allowed to access the Load Balancer through HTTP |`list(string)`|`[]`| no |
96
-
| <aname="input_http_ports"></a> [http\_ports](#input\_http\_ports)| Map containing objects to define listeners behaviour based on type field. If type field is `forward`, include listener\_port and the target\_group\_port. For `redirect` type, include listener port, host, path, port, protocol, query and status\_code. For `fixed-response`, include listener\_port, content\_type, message\_body and status\_code |`map(any)`| <pre>{<br/> "default": {<br/> "listener_port": 80,<br/> "target_group_port": 80,<br/> "target_group_protocol": "HTTP",<br/> "target_group_protocol_version": "HTTP1",<br/> "type": "forward"<br/> }<br/>}</pre> | no |
96
+
| <a name="input_http_ports"></a> [http\_ports](#input\_http\_ports) | Map containing objects to define listeners behaviour based on type field. If type field is `forward`, include listener\_port and the target\_group\_port. For `redirect` type, include listener port, host, path, port, protocol, query and status\_code. For `fixed-response`, include listener\_port, content\_type, message\_body and status\_code | <pre>map(object({<br/> type = optional(string)<br/><br/> listener_port = number<br/> target_group_port = number<br/><br/> target_group_protocol = optional(string, "HTTP")<br/> target_group_protocol_version = optional(string, "HTTP1") # HTTP1, HTTP2 or GRPC<br/><br/> host = optional(string, "#{host}")<br/> path = optional(string, "/#{path}")<br/> port = optional(string, "#{port}")<br/> protocol = optional(string, "#{protocol}")<br/> query = optional(string, "#{query}")<br/> status_code = optional(string) # Default for `type=redirect`: "HTTP_301". Default for `type=fixed-response`: "200".<br/> content_type = optional(string, "text/plain")<br/> message_body = optional(string, "Fixed response content")<br/> }))</pre> | <pre>{<br/> "default": {<br/> "listener_port": 80,<br/> "target_group_port": 80,<br/> "type": "forward"<br/> }<br/>}</pre> | no |
97
97
| <aname="input_https_ingress_cidr_blocks"></a> [https\_ingress\_cidr\_blocks](#input\_https\_ingress\_cidr\_blocks)| List of CIDR blocks to allowed to access the Load Balancer through HTTPS |`list(string)`| <pre>[<br/> "0.0.0.0/0"<br/>]</pre> | no |
98
98
| <aname="input_https_ingress_prefix_list_ids"></a> [https\_ingress\_prefix\_list\_ids](#input\_https\_ingress\_prefix\_list\_ids)| List of prefix list IDs blocks to allowed to access the Load Balancer through HTTPS |`list(string)`|`[]`| no |
99
-
| <aname="input_https_ports"></a> [https\_ports](#input\_https\_ports)| Map containing objects to define listeners behaviour based on type field. If type field is `forward`, include listener\_port and the target\_group\_port. For `redirect` type, include listener port, host, path, port, protocol, query and status\_code. For `fixed-response`, include listener\_port, content\_type, message\_body and status\_code |`map(any)`| <pre>{<br/> "default": {<br/> "listener_port": 443,<br/> "target_group_port": 443,<br/> "target_group_protocol": "HTTP",<br/> "target_group_protocol_version": "HTTP1",<br/> "type": "forward"<br/> }<br/>}</pre> | no |
99
+
| <a name="input_https_ports"></a> [https\_ports](#input\_https\_ports) | Map containing objects to define listeners behaviour based on type field. If type field is `forward`, include listener\_port and the target\_group\_port. For `redirect` type, include listener port, host, path, port, protocol, query and status\_code. For `fixed-response`, include listener\_port, content\_type, message\_body and status\_code | <pre>map(object({<br/> type = optional(string)<br/><br/> listener_port = number<br/> target_group_port = number<br/><br/> target_group_protocol = optional(string, "HTTP")<br/> target_group_protocol_version = optional(string, "HTTP1") # HTTP1, HTTP2 or GRPC<br/><br/> host = optional(string, "#{host}")<br/> path = optional(string, "/#{path}")<br/> port = optional(string, "#{port}")<br/> protocol = optional(string, "#{protocol}")<br/> query = optional(string, "#{query}")<br/> status_code = optional(string) # Default for `type=redirect`: "HTTP_301". Default for `type=fixed-response`: "200".<br/> content_type = optional(string, "text/plain")<br/> message_body = optional(string, "Fixed response content")<br/> }))</pre> | <pre>{<br/> "default": {<br/> "listener_port": 443,<br/> "target_group_port": 443,<br/> "type": "forward"<br/> }<br/>}</pre> | no |
100
100
| <aname="input_idle_timeout"></a> [idle\_timeout](#input\_idle\_timeout)| (Optional) The time in seconds that the connection is allowed to be idle. Default: 60. |`number`|`60`| no |
101
101
| <aname="input_internal"></a> [internal](#input\_internal)| (Optional) If true, the LB will be internal. |`bool`|`false`| no |
102
102
| <aname="input_ip_address_type"></a> [ip\_address\_type](#input\_ip\_address\_type)| (Optional) The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 and dualstack. Defaults to ipv4 |`string`|`"ipv4"`| no |
description="Map containing objects to define listeners behaviour based on type field. If type field is `forward`, include listener_port and the target_group_port. For `redirect` type, include listener port, host, path, port, protocol, query and status_code. For `fixed-response`, include listener_port, content_type, message_body and status_code"
149
-
type=map(any)
149
+
type=map(object({
150
+
type =optional(string)
151
+
152
+
listener_port =number
153
+
target_group_port =number
154
+
155
+
target_group_protocol =optional(string, "HTTP")
156
+
target_group_protocol_version =optional(string, "HTTP1") # HTTP1, HTTP2 or GRPC
157
+
158
+
host =optional(string, "#{host}")
159
+
path =optional(string, "/#{path}")
160
+
port =optional(string, "#{port}")
161
+
protocol =optional(string, "#{protocol}")
162
+
query =optional(string, "#{query}")
163
+
status_code =optional(string) # Default for `type=redirect`: "HTTP_301". Default for `type=fixed-response`: "200".
description="Map containing objects to define listeners behaviour based on type field. If type field is `forward`, include listener_port and the target_group_port. For `redirect` type, include listener port, host, path, port, protocol, query and status_code. For `fixed-response`, include listener_port, content_type, message_body and status_code"
164
-
type=map(any)
178
+
type=map(object({
179
+
type =optional(string)
180
+
181
+
listener_port =number
182
+
target_group_port =number
183
+
184
+
target_group_protocol =optional(string, "HTTP")
185
+
target_group_protocol_version =optional(string, "HTTP1") # HTTP1, HTTP2 or GRPC
186
+
187
+
host =optional(string, "#{host}")
188
+
path =optional(string, "/#{path}")
189
+
port =optional(string, "#{port}")
190
+
protocol =optional(string, "#{protocol}")
191
+
query =optional(string, "#{query}")
192
+
status_code =optional(string) # Default for `type=redirect`: "HTTP_301". Default for `type=fixed-response`: "200".
0 commit comments