-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add HTTP2 IdP target group #762
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update the IdP load balancer to include an HTTP1 and HTTP2 target group. An ALB listener rule has also been added to send all REST API requests to the HTTP1 target group, while the HTTP2 target group is responsible for forwarding all other traffic. The ECS service has also been updated to register both target groups.
⚠ Terrform update availableTerraform: 1.9.3 (using 1.9.2)
Terragrunt: 0.66.2 (using 0.63.2) |
Staging: idp✅ Terraform Init: Plan: 4 to add, 2 to change, 2 to destroy Show summary
Show planResource actions are indicated with the following symbols:
+ create
~ update in-place
- destroy
+/- create replacement and then destroy
Terraform will perform the following actions:
# aws_alb_listener_rule.idp_protocol_version will be created
+ resource "aws_alb_listener_rule" "idp_protocol_version" {
+ arn = (known after apply)
+ id = (known after apply)
+ listener_arn = "arn:aws:elasticloadbalancing:ca-central-1:687401027353:listener/app/idp/9bb4fc6f33420bc4/ab056b245c94d5c3"
+ priority = 100
+ tags_all = {
+ "CostCentre" = "forms-platform-staging"
+ "Terraform" = "true"
}
+ action {
+ order = (known after apply)
+ target_group_arn = (known after apply)
+ type = "forward"
}
+ condition {
+ path_pattern {
+ values = [
+ "/*/v?/*",
]
}
}
}
# aws_lb_listener.idp will be updated in-place
~ resource "aws_lb_listener" "idp" {
id = "arn:aws:elasticloadbalancing:ca-central-1:687401027353:listener/app/idp/9bb4fc6f33420bc4/ab056b245c94d5c3"
tags = {
"CostCentre" = "forms-platform-staging"
"Terraform" = "true"
}
# (7 unchanged attributes hidden)
~ default_action {
~ target_group_arn = "arn:aws:elasticloadbalancing:ca-central-1:687401027353:targetgroup/idp-tg-725/0e3b13f26a36f391" -> (known after apply)
# (2 unchanged attributes hidden)
}
# (1 unchanged block hidden)
}
# aws_lb_target_group.idp will be destroyed
# (because resource uses count or for_each)
- resource "aws_lb_target_group" "idp" {
- arn = "arn:aws:elasticloadbalancing:ca-central-1:687401027353:targetgroup/idp-tg-725/0e3b13f26a36f391" -> null
- arn_suffix = "targetgroup/idp-tg-725/0e3b13f26a36f391" -> null
- deregistration_delay = "30" -> null
- id = "arn:aws:elasticloadbalancing:ca-central-1:687401027353:targetgroup/idp-tg-725/0e3b13f26a36f391" -> null
- ip_address_type = "ipv4" -> null
- lambda_multi_value_headers_enabled = false -> null
- load_balancer_arns = [
- "arn:aws:elasticloadbalancing:ca-central-1:687401027353:loadbalancer/app/idp/9bb4fc6f33420bc4",
] -> null
- load_balancing_algorithm_type = "round_robin" -> null
- load_balancing_anomaly_mitigation = "off" -> null
- load_balancing_cross_zone_enabled = "use_load_balancer_configuration" -> null
- name = "idp-tg-725" -> null
- port = 8080 -> null
- protocol = "HTTPS" -> null
- protocol_version = "HTTP1" -> null
- proxy_protocol_v2 = false -> null
- slow_start = 0 -> null
- tags = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
- tags_all = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
- target_type = "ip" -> null
- vpc_id = "vpc-0ad5b3739860129d0" -> null
# (1 unchanged attribute hidden)
- health_check {
- enabled = true -> null
- healthy_threshold = 3 -> null
- interval = 30 -> null
- matcher = "200-399" -> null
- path = "/debug/healthz" -> null
- port = "traffic-port" -> null
- protocol = "HTTPS" -> null
- timeout = 5 -> null
- unhealthy_threshold = 3 -> null
}
- stickiness {
- cookie_duration = 86400 -> null
- enabled = true -> null
- type = "lb_cookie" -> null
# (1 unchanged attribute hidden)
}
- target_failover {}
- target_group_health {
- dns_failover {
- minimum_healthy_targets_count = "1" -> null
- minimum_healthy_targets_percentage = "off" -> null
}
- unhealthy_state_routing {
- minimum_healthy_targets_count = 1 -> null
- minimum_healthy_targets_percentage = "off" -> null
}
}
- target_health_state {}
}
# aws_lb_target_group.idp["HTTP1"] will be created
+ resource "aws_lb_target_group" "idp" {
+ arn = (known after apply)
+ arn_suffix = (known after apply)
+ connection_termination = (known after apply)
+ deregistration_delay = "30"
+ id = (known after apply)
+ ip_address_type = (known after apply)
+ lambda_multi_value_headers_enabled = false
+ load_balancer_arns = (known after apply)
+ load_balancing_algorithm_type = (known after apply)
+ load_balancing_anomaly_mitigation = (known after apply)
+ load_balancing_cross_zone_enabled = (known after apply)
+ name = (known after apply)
+ name_prefix = (known after apply)
+ port = 8080
+ preserve_client_ip = (known after apply)
+ protocol = "HTTPS"
+ protocol_version = "HTTP1"
+ proxy_protocol_v2 = false
+ slow_start = 0
+ tags = {
+ "CostCentre" = "forms-platform-staging"
+ "Terraform" = "true"
}
+ tags_all = {
+ "CostCentre" = "forms-platform-staging"
+ "Terraform" = "true"
}
+ target_type = "ip"
+ vpc_id = "vpc-0ad5b3739860129d0"
+ health_check {
+ enabled = true
+ healthy_threshold = 3
+ interval = 30
+ matcher = "200-399"
+ path = "/debug/healthz"
+ port = "traffic-port"
+ protocol = "HTTPS"
+ timeout = (known after apply)
+ unhealthy_threshold = 3
}
+ stickiness {
+ cookie_duration = 86400
+ enabled = true
+ type = "lb_cookie"
}
+ target_failover (known after apply)
+ target_group_health (known after apply)
+ target_health_state (known after apply)
}
# aws_lb_target_group.idp["HTTP2"] will be created
+ resource "aws_lb_target_group" "idp" {
+ arn = (known after apply)
+ arn_suffix = (known after apply)
+ connection_termination = (known after apply)
+ deregistration_delay = "30"
+ id = (known after apply)
+ ip_address_type = (known after apply)
+ lambda_multi_value_headers_enabled = false
+ load_balancer_arns = (known after apply)
+ load_balancing_algorithm_type = (known after apply)
+ load_balancing_anomaly_mitigation = (known after apply)
+ load_balancing_cross_zone_enabled = (known after apply)
+ name = (known after apply)
+ name_prefix = (known after apply)
+ port = 8080
+ preserve_client_ip = (known after apply)
+ protocol = "HTTPS"
+ protocol_version = "HTTP2"
+ proxy_protocol_v2 = false
+ slow_start = 0
+ tags = {
+ "CostCentre" = "forms-platform-staging"
+ "Terraform" = "true"
}
+ tags_all = {
+ "CostCentre" = "forms-platform-staging"
+ "Terraform" = "true"
}
+ target_type = "ip"
+ vpc_id = "vpc-0ad5b3739860129d0"
+ health_check {
+ enabled = true
+ healthy_threshold = 3
+ interval = 30
+ matcher = "200-399"
+ path = "/debug/healthz"
+ port = "traffic-port"
+ protocol = "HTTPS"
+ timeout = (known after apply)
+ unhealthy_threshold = 3
}
+ stickiness {
+ cookie_duration = 86400
+ enabled = true
+ type = "lb_cookie"
}
+ target_failover (known after apply)
+ target_group_health (known after apply)
+ target_health_state (known after apply)
}
# random_string.idp_alb_tg_suffix must be replaced
+/- resource "random_string" "idp_alb_tg_suffix" {
~ id = "725" -> (known after apply)
~ keepers = { # forces replacement
- "protocol_version" = "HTTP1" -> null
+ "protocol_versions" = "HTTP1,HTTP2"
# (2 unchanged elements hidden)
}
~ result = "725" -> (known after apply)
# (10 unchanged attributes hidden)
}
# module.idp_ecs.aws_ecs_service.this will be updated in-place
~ resource "aws_ecs_service" "this" {
- health_check_grace_period_seconds = 60 -> null
id = "arn:aws:ecs:ca-central-1:687401027353:service/idp/zitadel"
name = "zitadel"
tags = {
"CostCentre" = "forms-platform-staging"
"Terraform" = "true"
}
# (15 unchanged attributes hidden)
- load_balancer {
- container_name = "zitadel" -> null
- container_port = 8080 -> null
- target_group_arn = "arn:aws:elasticloadbalancing:ca-central-1:687401027353:targetgroup/idp-tg-725/0e3b13f26a36f391" -> null
# (1 unchanged attribute hidden)
}
+ load_balancer {
+ container_name = "zitadel"
+ container_port = 8080
+ target_group_arn = (known after apply)
# (1 unchanged attribute hidden)
}
+ load_balancer {
+ container_name = "zitadel"
+ container_port = 8080
+ target_group_arn = (known after apply)
# (1 unchanged attribute hidden)
}
# (3 unchanged blocks hidden)
}
Plan: 4 to add, 2 to change, 2 to destroy.
Changes to Outputs:
~ lb_idp_target_group_arn_suffix = "targetgroup/idp-tg-725/0e3b13f26a36f391" -> (known after apply)
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
Show Conftest resultsWARN - plan.json - main - Missing Common Tags: ["aws_alb_listener_rule.idp_protocol_version"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.idp_send_email"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_user.idp_send_email"]
WARN - plan.json - main - Missing Common Tags: ["aws_shield_protection.idp"]
23 tests, 19 passed, 4 warnings, 0 failures, 0 exceptions
|
craigzour
approved these changes
Aug 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Update the IdP load balancer to include an HTTP1 and HTTP2 target group. An ALB listener rule has also been added to send all REST API requests to the HTTP1 target group, while the HTTP2 target group is responsible for forwarding all other traffic.
The ECS service has also been updated to register both target groups.
Related