hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.83k stars 9.17k forks source link

[Bug]: Error get target_group_arn from Listener #36567

Open RENATOZANGER opened 7 months ago

RENATOZANGER commented 7 months ago

Terraform Core Version

1.1.9

AWS Provider Version

5.36.0

Affected Resource(s)

aws_lb_listener

Expected Behavior

should return the value of target_group_arn from listener

Actual Behavior

the target_group_arn value is returning empty

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

provider "aws" {
  profile = "xxx"
  region = "sa-east-1"
  access_key ="xxx"
  secret_key = "xxx"
 token = "xxx"
}

terraform {
  required_providers {
    aws = {
      source = "hashicorp/aws"
      version= "5.36.0"
    }
  }
  required_version = "1.1.9"
}

data "aws_lb" "this"{
  name="name_alb"
}
data "aws_lb_listener" "this"{
  load_balancer_arn= data.aws_lb.this.arn
  port =8097
}
output "listener_8097"{
  value = data.aws_lb_listener.this.default_action[*].target_group_arn
}

Steps to Reproduce

terraform init
terraform plan -no-color > tfplan.txt

Debug Output

listener_8097 = [
  "",
]

Panic Output

No response

Important Factoids

The functionality works up to version 5.35.0. From version 5.36.0 onwards, the target_group_arn is not being returned

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 7 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

justinretzolk commented 7 months ago

Hey @RENATOZANGER 👋 Thank you for taking the time to raise this! Are you able to supply debug logs (redacted as needed) in case whoever picks this up needs that information?

RENATOZANGER commented 7 months ago

Hey @RENATOZANGER 👋 Thank you for taking the time to raise this! Are you able to supply debug logs (redacted as needed) in case whoever picks this up needs that information?

Hi @justinretzolk , thanks for the response. Unfortunately I can't export the debug log because I'm running terraform within the company, I can't export the information, if there's another way I can do it let me know, I'm willing to help.

bennos3 commented 3 months ago

Hey @RENATOZANGER 👋 Thank you for taking the time to raise this! Are you able to supply debug logs (redacted as needed) in case whoever picks this up needs that information?

I also have this issue. How can I help get a fix? How can I collect the debug logs for this?