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

aws_lb_target_group for an instance type target group is trying to add (or make a change) of attribute: lambda_multi_value_headers_enabled #7960

Closed
darkwizard242 opened this issue Mar 15, 2019 · 10 comments
Labels
bug Addresses a defect in current functionality. service/elbv2 Issues and PRs that pertain to the elbv2 service.

Comments

@darkwizard242
Copy link

darkwizard242 commented Mar 15, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.11.13

Affected Resource(s)

  • aws_alb_target_group
  • aws_alb_listener_rule

Terraform Configuration Files

resource "aws_alb_target_group" "myapp-dev-target-group" {
  name     = "myapp-dev-tg"
  port     = 443
  protocol = "HTTPS"
  vpc_id   = "${aws_vpc.myvpc.id}"
  health_check {
    interval            = 30
    path                = "/myapp"
    protocol            = "HTTPS"
    port                = 443
    timeout             = 5
    healthy_threshold   = 5
    unhealthy_threshold = 2
    matcher             = "200,302"
  }
  tags {
    Name        = "dev-target-group"
    Owner       = "Tech-Overlord"
    Environment = "dev"
  }
}

Expected Behavior

The code provided above is just a sample for an existing instance type target group in AWS that already has been created using Terraform and should not reflect in either terraform plan or terraform apply .

Actual Behavior

Although the terraform resource for the target group above is instance type and it already exists. It suggests the following change every time that I try to do a terraform plan or terraform apply:

lambda_multi_value_headers_enabled: "" => "false"

It is understandable if it suggests for this attribute change if the target group was of lambda type. However, a prompt for the change doesn't make sense if the target group is not of lambda type. I would recommend that the attribute change should only be prompted when the target group type is lambda. However, if that is not the case and there is a reason behind that attribute change to be supplied against an instance type target group, then please advise.

Steps to Reproduce

Either of the following against an existing instance type target group:

  1. terraform plan
  2. terraform apply

Temporary workaround

Adding a lifecycle block with ignore_changes for lambda_multi_value_headers_enabled in the aws_alb_target_group resource for an instance type target group will stop prompting for the change when terraform plan or terraform apply are executed.

lifecycle {
   ignore_changes = "lambda_multi_value_headers_enabled"
 }

References

Listed below are the original feature request that was raised and the pull request that included this new change for lambda_multi_value_headers_enabled:

@bflad bflad added the service/elbv2 Issues and PRs that pertain to the elbv2 service. label Mar 19, 2019
sampierson added a commit to HumanCellAtlas/upload-service that referenced this issue Mar 26, 2019
As described in: hashicorp/terraform-provider-aws#7960

Terraform is saying:

    Terraform will perform the following actions:

      ~ module.upload-service.module.upload-service-database.aws_lb_target_group.pgbouncer
          lambda_multi_value_headers_enabled: "" => "false"

Installing the workaround described in the git issue.
maniarathi pushed a commit to HumanCellAtlas/upload-service that referenced this issue Mar 29, 2019
As described in: hashicorp/terraform-provider-aws#7960

Terraform is saying:

    Terraform will perform the following actions:

      ~ module.upload-service.module.upload-service-database.aws_lb_target_group.pgbouncer
          lambda_multi_value_headers_enabled: "" => "false"

Installing the workaround described in the git issue.
@aeschright aeschright added needs-triage Waiting for first response or review from a maintainer. bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 24, 2019
@darkwizard242
Copy link
Author

This bug no longer persists in AWS provider version: v2.20.0 with Terraform (0.12.x).

Tested on:

Terraform v0.12.3
provider.aws v2.20.0

@Sytten
Copy link

Sytten commented Sep 7, 2019

It is still present here:

Terraform v0.11.3
provider.aws v2.27.0

@darkwizard242
Copy link
Author

@Sytten - You may want to try out the lifecycle workaround:

lifecycle {
   ignore_changes = "lambda_multi_value_headers_enabled"
 }

@Sytten
Copy link

Sytten commented Sep 8, 2019

Yeah thats what I did, still I didnt have this problem before so its a regression

@zliuva
Copy link

zliuva commented Nov 18, 2019

I'm seeing the same issue and also with deregistration_delay and slow_start (i.e. any field that was not explicitly set)

# terraform version
Terraform v0.12.15
+ provider.aws v2.37.0

@kladiv
Copy link

kladiv commented Nov 20, 2019

+1

@mrnonz
Copy link
Contributor

mrnonz commented Apr 15, 2020

It is still occur here:

Terraform v0.11.14
+ provider.aws v2.57.0

@bcsgh
Copy link

bcsgh commented Jan 11, 2021

I'm seeing this (and also proxy_protocol_v2=false) with:

Terraform v0.13.4
+ provider registry.terraform.io/hashicorp/aws v3.23.0

Also lifecycle.ignore_changes seems to not work here (?), presumably because the is being updated from rather than "".

@zhelding
Copy link
Contributor

zhelding commented Aug 3, 2022

This issue seems to have been resolved in more up-to-date versions of Terraform; if the problem persists, please feel free to open a new issue!

@zhelding zhelding closed this as completed Aug 3, 2022
@github-actions
Copy link

github-actions bot commented Sep 3, 2022

I'm going to lock this issue 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 similar to this, 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 Sep 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/elbv2 Issues and PRs that pertain to the elbv2 service.
Projects
None yet
Development

No branches or pull requests

9 participants