Skip to content

Commit

Permalink
Push pre-commit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharth-singh1 authored and github-actions[bot] committed Dec 6, 2024
1 parent 9293eab commit 635771b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions example/alb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ module "alb" {
alb = {
name = "arc-poc-alb"
internal = false
port = 80
port = 80
}

alb_target_group = [{
name = "arc-poc-alb-tg"
port = 80
protocol = "HTTP"
vpc_id = "vpc-12345"
vpc_id = "vpc-12345"
health_check = {
enabled = true
path = "/"
Expand Down
10 changes: 5 additions & 5 deletions modules/alb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,26 @@ No modules.
| [aws_lb_listener_rule.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener_rule) | resource |
| [aws_lb_target_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group) | resource |
| [aws_security_group.lb_sg](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
| [aws_subnets.public](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnets) | data source |
| [aws_subnet.public](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet) | data source |
| [aws_subnets.all](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnets) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_alb"></a> [alb](#input\_alb) | n/a | <pre>object({<br> name = optional(string, null)<br> port = optional(number)<br> protocol = optional(string, "HTTP")<br> internal = optional(bool, false)<br> load_balancer_type = optional(string, "application")<br> idle_timeout = optional(number, 60)<br> enable_deletion_protection = optional(bool, false)<br> enable_http2 = optional(bool, true)<br> certificate_arn = optional(string, null)<br> subnets = list(string)<br><br> access_logs = optional(object({<br> bucket = string<br> enabled = optional(bool, false)<br> prefix = optional(string, "")<br> }))<br><br> tags = optional(map(string), {})<br> })</pre> | n/a | yes |
| <a name="input_alb"></a> [alb](#input\_alb) | n/a | <pre>object({<br> name = optional(string, null)<br> port = optional(number)<br> protocol = optional(string, "HTTP")<br> internal = optional(bool, false)<br> load_balancer_type = optional(string, "application")<br> idle_timeout = optional(number, 60)<br> enable_deletion_protection = optional(bool, false)<br> enable_http2 = optional(bool, true)<br> certificate_arn = optional(string, null)<br><br> access_logs = optional(object({<br> bucket = string<br> enabled = optional(bool, false)<br> prefix = optional(string, "")<br> }))<br><br> tags = optional(map(string), {})<br> })</pre> | n/a | yes |
| <a name="input_alb_target_group"></a> [alb\_target\_group](#input\_alb\_target\_group) | List of target groups to create | <pre>list(object({<br> name = optional(string, "target-group")<br> port = number<br> protocol = optional(string, null)<br> protocol_version = optional(string, "HTTP1")<br> vpc_id = optional(string, "")<br> target_type = optional(string, "instance")<br> ip_address_type = optional(string, "ipv4")<br> load_balancing_algorithm_type = optional(string, "round_robin")<br> load_balancing_cross_zone_enabled = optional(string, "use_load_balancer_configuration")<br> deregistration_delay = optional(number, 300)<br> slow_start = optional(number, 0)<br> tags = optional(map(string), {})<br><br> health_check = optional(object({<br> enabled = optional(bool, true)<br> protocol = optional(string, "HTTP") # Allowed values: "HTTP", "HTTPS", "TCP", etc.<br> path = optional(string, "/")<br> port = optional(string, "traffic-port")<br> timeout = optional(number, 6)<br> healthy_threshold = optional(number, 3)<br> unhealthy_threshold = optional(number, 3)<br> interval = optional(number, 30)<br> matcher = optional(string, "200") # Default HTTP matcher. Range 200 to 499<br> }))<br><br> stickiness = optional(object({<br> enabled = optional(bool, true)<br> type = string<br> cookie_duration = optional(number, 86400)<br> })<br> )<br><br> }))</pre> | n/a | yes |
| <a name="input_create_alb"></a> [create\_alb](#input\_create\_alb) | A flag that decides whether to create alb | `bool` | `false` | no |
| <a name="input_create_listener_rule"></a> [create\_listener\_rule](#input\_create\_listener\_rule) | n/a | `bool` | `false` | no |
| <a name="input_listener_rules"></a> [listener\_rules](#input\_listener\_rules) | List of listener rules to create | <pre>list(object({<br> # listener_arn = string<br> priority = number<br><br> conditions = list(object({<br> field = string<br> values = list(string)<br> }))<br><br> actions = list(object({<br> type = string<br> target_group_arn = optional(string)<br> order = optional(number)<br> redirect = optional(object({<br> protocol = string<br> port = string<br> host = optional(string)<br> path = optional(string)<br> query = optional(string)<br> status_code = string<br> }), null)<br><br> fixed_response = optional(object({<br> content_type = string<br> message_body = optional(string)<br> status_code = optional(string)<br> }), null)<br><br> }))<br><br> }))</pre> | n/a | yes |
| <a name="input_listener_rules"></a> [listener\_rules](#input\_listener\_rules) | List of listener rules to create | <pre>list(object({<br> priority = number<br><br> conditions = list(object({<br> field = string<br> values = list(string)<br> }))<br><br> actions = list(object({<br> type = string<br> target_group_arn = optional(string)<br> order = optional(number)<br> redirect = optional(object({<br> protocol = string<br> port = string<br> host = optional(string)<br> path = optional(string)<br> query = optional(string)<br> status_code = string<br> }), null)<br><br> fixed_response = optional(object({<br> content_type = string<br> message_body = optional(string)<br> status_code = optional(string)<br> }), null)<br><br> }))<br><br> }))</pre> | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | n/a | `string` | `"us-east-1"` | no |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | VPC in which security group for ALB has to be created | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_alb_subnets_debug"></a> [alb\_subnets\_debug](#output\_alb\_subnets\_debug) | n/a |
| <a name="output_public_subnet_ids"></a> [public\_subnet\_ids](#output\_public\_subnet\_ids) | List of IDs of the public subnets in the specified VPC |
| <a name="output_public_subnets"></a> [public\_subnets](#output\_public\_subnets) | Use the filtered subnets |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

## Development
Expand Down
2 changes: 1 addition & 1 deletion modules/alb/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ data "aws_subnet" "public" {
for_each = toset(data.aws_subnets.all.ids)

id = each.value
}
}
2 changes: 1 addition & 1 deletion modules/alb/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ locals {
for s in data.aws_subnet.public :
s.id if lookup(s.tags, "Type", "") == "public"
]
}
}
4 changes: 2 additions & 2 deletions modules/alb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ resource "aws_lb_listener" "http" {
target_group_arn = length(each.value.actions) > 0 ? lookup(each.value.actions[0], "target_group_arn", null) : null
}
}
depends_on = [ aws_lb_target_group.this ]
depends_on = [aws_lb_target_group.this]
}


Expand Down Expand Up @@ -200,5 +200,5 @@ resource "aws_lb_listener_rule" "this" {
}
}

depends_on = [ aws_lb_listener.http ]
depends_on = [aws_lb_listener.http]
}

0 comments on commit 635771b

Please sign in to comment.