Skip to content

Conversation

@flora-five
Copy link
Contributor

Description

The complete-alb example needs a few fixes to apply without errors.

Motivation and Context

terraform apply returns a warning and some errors:

╷
│ Warning: Invalid Attribute Combination
│ 
│   with module.alb.aws_lb_target_group.this["ex-lambda-with-trigger"],
│   on ../../main.tf line 578, in resource "aws_lb_target_group" "this":
│  578:   port                               = each.value.target_type == "lambda" ? null : coalesce(each.value.port, var.default_port)
│ 
│ Attribute "port" cannot be specified when "target_type" is "lambda".
│ 
│ This will be an error in a future release.
│ 
│ (and one more similar warning elsewhere)
╵
╷
│ Error: Missing required argument
│ 
│   with module.alb.aws_lb_listener_rule.this["ex-http-https-redirect/ex-weighted-forward"],
│   on ../../main.tf line 299, in resource "aws_lb_listener_rule" "this":
│  299: resource "aws_lb_listener_rule" "this" {
│ 
│ The argument "action.0.forward.0.target_group.0.arn" is required, but no
│ definition was found.
╵
╷
│ Error: Missing required argument
│ 
│   with module.alb.aws_lb_listener_rule.this["ex-http-https-redirect/ex-weighted-forward"],
│   on ../../main.tf line 299, in resource "aws_lb_listener_rule" "this":
│  299: resource "aws_lb_listener_rule" "this" {
│ 
│ The argument "action.0.forward.0.target_group.1.arn" is required, but no
│ definition was found.
╵
╷
│ Error: Only one of host_header, http_header, http_request_method, path_pattern, query_string or source_ip can be set in a condition block
│ 
│   with module.alb.aws_lb_listener_rule.this["ex-https/ex-weighted-forward"],
│   on ../../main.tf line 299, in resource "aws_lb_listener_rule" "this":
│  299: resource "aws_lb_listener_rule" "this" {
│ 

Breaking Changes

None

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@bryantbiggs bryantbiggs changed the title fix: Update the complete-alb example to apply without errors docs: Update the complete-alb example to apply without errors Oct 1, 2025
@bryantbiggs bryantbiggs merged commit a13bc10 into terraform-aws-modules:master Oct 1, 2025
10 checks passed
@antonbabenko
Copy link
Member

This PR is included in version 10.0.1 🎉

@github-actions
Copy link

github-actions bot commented Nov 1, 2025

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants