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.74k stars 9.1k forks source link

[Doc]: aws_codedeploy_deployment_group - listener_arns #29628

Open timothyclarke opened 1 year ago

timothyclarke commented 1 year ago

Terraform Core Version

1.3.7

AWS Provider Version

4.55.0

Affected Resource(s)

aws_codedeploy_deployment_group.load_balancer_info.target_group_pair_info.prod_traffic_route.listener_arns Aka

resource "aws_codedeploy_deployment_group" "example" {
  load_balancer_info {
    target_group_pair_info {
      prod_traffic_route {
        listener_arns = [aws_lb_listener.http.arn,aws_lb_listener.https.arn]
      }
    }
  }
}

Expected Behavior

Multiple listener arn's to be managed by code deploy

Actual Behavior

An error indicating that only a single listener arn can be supplied

Relevant Error/Panic Output Snippet

│ Error: error updating CodeDeploy deployment group (<UUID>): InvalidTrafficRoutingConfigurationException: Production traffic route must have exactly one listener Arn

Terraform Configuration Files

.

Steps to Reproduce

Create a deployment group with 2 listeners or update an existing code deploy group to have 2 listeners

Debug Output

No response

Panic Output

No response

Important Factoids

If AWS does not support multiple listeners please switch listener_arns (plural) to listener_arn (singular) and remove the list as the input so only one listener arn can be supplied

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

justinretzolk commented 1 year ago

Hey @timothyclarke 👋 Thank you for taking the time to raise this! It looks like the underlying type of prod_traffic_route from the AWS Go SDK is type TrafficRoute, which has a field called ListenerArns. This field is where the listener_arns argument name and type comes from, as we try to mirror the underlying SDK/API as much as possible. That said, this seems like something that we should add validation and documentation for, so I'd like to leave this issue open to be addressed.