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 protocol_version update should destroy/create #17797

Closed
github-vincent-miszczak opened this issue Feb 24, 2021 · 5 comments · Fixed by #17845
Closed

aws_lb_target_group protocol_version update should destroy/create #17797

github-vincent-miszczak opened this issue Feb 24, 2021 · 5 comments · Fixed by #17845
Labels
bug Addresses a defect in current functionality. service/elbv2 Issues and PRs that pertain to the elbv2 service.
Milestone

Comments

@github-vincent-miszczak
Copy link
Contributor

Affected Resource(s)

aws_lb_target_group

Using 3.27.0.

Expected Behavior

Changing property protocol_version from GRPC to HTTP2 should trigger a destroy/create.

Actual Behavior

# aws_lb_target_group.XXX will be updated in-place
~ resource "aws_lb_target_group" "XXX" {
  ...
    ~ protocol_version                   = "GRPC" -> "HTTP2"
    ...
  }

TF wants to modify the resource.
When applied, no error occurs but the value is not updated, and another plan wants to apply the update again.

In my case, I did change the healthcheck endpoint at the same time, expecting the updated protocol would be used. The endpoint was changed but not the protocol, healtchcheck failed and my ASG was drained 💥

Steps to Reproduce

Create a resource aws_lb_target_group with protocol_version = GRPC then update to HTTP2 and notice the change is not applied.

@ghost ghost added the service/elbv2 Issues and PRs that pertain to the elbv2 service. label Feb 24, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 24, 2021
@ewbankkit
Copy link
Contributor

Relates:

The diff is being suppressed here:

DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
if d.Get("target_type").(string) == elbv2.TargetTypeEnumLambda {
return true
}
switch d.Get("protocol").(string) {
case elbv2.ProtocolEnumHttp, elbv2.ProtocolEnumHttps:
return false
}
return true

@ewbankkit ewbankkit added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Feb 24, 2021
@coolbananas118
Copy link

We ran into a similar issue. We are trying to change protocol_version = "HTTP1" -> "HTTP2" and it's not being applied. TF says it'll be done in place but from what I see in the AWS console you can't change this setting therefore it would required a drop/create.

@dizlv
Copy link

dizlv commented Apr 28, 2021

Same here: protocol_version = "HTTP2" -> "HTTP1" and tries to update the resource in-place, but nothing actual happens.
Provider Version: 3.37.0.

Had to use terraform taint for that specific resource to force re-creation.

@github-actions github-actions bot added this to the v4.50.0 milestone Jan 12, 2023
@github-actions
Copy link

This functionality has been released in v4.50.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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 Feb 13, 2023
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
4 participants