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.72k stars 9.08k forks source link

[Bug]: Fixed-Response `aws_lb_listener_rule` Always Shows Spurious `+ condition {}` Diff #38354

Open jamiejackson opened 1 month ago

jamiejackson commented 1 month ago

Terraform Core Version

1.8.3

AWS Provider Version

5.58.0

Affected Resource(s)

Expected Behavior

Applying plan diffs should result in no more plan diffs. This is especially important as we have drift detection pipelines enabled, which fail when there are diffs.

Actual Behavior

Terraform always thinks that condition {} should be added.

Relevant Error/Panic Output Snippet

Terraform will perform the following actions:

  # aws_lb_listener_rule.test4_hudexchange_info__https__default will be updated in-place
  ~ resource "aws_lb_listener_rule" "test4_hudexchange_info__https__default" {
        id           = "arn:aws:elasticloadbalancing:us-east-1:063649415520:listener-rule/app/dev-elb/4f0bf3674f68865f/5d0e9f172dd7ed5c/f8ca34c4a6d7f43a"
        tags         = {}
        # (4 unchanged attributes hidden)

      + condition {}

        # (1 unchanged block hidden)
    }

Terraform Configuration Files

resource "aws_lb_listener_rule" "test4_hudexchange_info__https__default" {
  listener_arn = aws_lb_listener.test4_hudexchange_info__https.arn
  priority     = 99999
  tags         = {}
  action {
    order = 1
    type  = "fixed-response"
    fixed_response {
      content_type = "text/plain"
      message_body = "Host not recognized."
      status_code  = jsonencode(503)
    }
  }
  condition {}
}

Steps to Reproduce

plan, apply, repeat.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue