Skip to content
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

[Bug]: aws_lb_listener Datastore's default_action is not filled if the type is forward #36459

Open
tmarlok88 opened this issue Mar 19, 2024 · 1 comment · May be fixed by #37348
Open

[Bug]: aws_lb_listener Datastore's default_action is not filled if the type is forward #36459

tmarlok88 opened this issue Mar 19, 2024 · 1 comment · May be fixed by #37348
Labels
bug Addresses a defect in current functionality. service/elbv2 Issues and PRs that pertain to the elbv2 service.

Comments

@tmarlok88
Copy link
Contributor

tmarlok88 commented Mar 19, 2024

Terraform Core Version

1.7.4

AWS Provider Version

5.36.0

Affected Resource(s)

aws_lb_listener data source

Expected Behavior

It should fill the default_action.target_group_arn attribute in an aws_lb_listener data source even if the type is forward.

Actual Behavior

the target_group_arn value is an empty string

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "> 5.36"
    }
  }
  required_version = "~> 1.0"
}


provider "aws" {
  region = "<REGION>"
}


data "aws_lb_listener" "prod-listener" {
  load_balancer_arn = "<FILL_THE_ARN>"
  port              = 443
}

output "target_group" {
	value = one(data.aws_lb_listener.prod-listener.default_action[*].target_group_arn)
}

Steps to Reproduce

If you pin the version to < 5.36.0 then the proper target_group_arn is returned, but starting from 5.36.0, there is only an empty string.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

The error was introduced in this PR: #35671

Would you like to implement a fix?

Yes

@tmarlok88 tmarlok88 added the bug Addresses a defect in current functionality. label Mar 19, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/elbv2 Issues and PRs that pertain to the elbv2 service. label Mar 19, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 19, 2024
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Mar 19, 2024
tmarlok88 pushed a commit to tmarlok88/terraform-provider-aws that referenced this issue May 8, 2024
…not filled in an aws_lb_listener datasource
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/elbv2 Issues and PRs that pertain to the elbv2 service.
Projects
None yet
2 participants