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

[Bug]: resource/aws_lb_target_group - Forces replacement of resource after importing #27463

Closed
posquit0 opened this issue Oct 25, 2022 · 5 comments · Fixed by #27464
Closed
Labels
bug Addresses a defect in current functionality. service/elbv2 Issues and PRs that pertain to the elbv2 service.
Milestone

Comments

@posquit0
Copy link
Contributor

posquit0 commented Oct 25, 2022

Terraform Core Version

1.3.3

AWS Provider Version

4.36.1

Affected Resource(s)

  • resource/aws_lb_target_group

Expected Behavior

After importing the existing IP target group(IPv4 address type), it should be safe from replacement by Terraform.

Actual Behavior

After importing the existing IP target group(IPv4 address type), Terraform always makes a plan to forcibly replace the target group.

  # module.nlb_ip_target_group["nlb-ip-traefik"].aws_lb_target_group.this must be replaced
-/+ resource "aws_lb_target_group" "this" {
      ~ arn                                = "arn:aws:elasticloadbalancing:ap-northeast-2:xxxxxxxxxx:targetgroup/nlb-ip-traefik/dddd" -> (known after apply)
      ~ arn_suffix                         = "targetgroup/nlb-ip-traefik/dddd" -> (known after apply)
      ~ id                                 = "arn:aws:elasticloadbalancing:ap-northeast-2:xxxxxxxx:targetgroup/nlb-ip-traefik/dddd" -> (known after apply)
      + ip_address_type                    = "ipv4" # forces replacement
      + lambda_multi_value_headers_enabled = false
      + load_balancing_algorithm_type      = (known after apply)
        name                               = "nlb-ip-traefik"
      + protocol_version                   = (known after apply)
      + slow_start                         = 0
        tags                               = {

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_lb_target_group" "this" {
  ...

  target_type     = "ip"
  ip_address_type = "ipv4"
  ...
}

Steps to Reproduce

  • Create NLB IP target group with IPv4 address type.
  • Import the target group to terraform.
  • Execute terraform plan.
  • You can see that terraform will try to replace the target group.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

Would you like to implement a fix?

No response

@posquit0 posquit0 added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Oct 25, 2022
@github-actions github-actions bot added the service/elbv2 Issues and PRs that pertain to the elbv2 service. label Oct 25, 2022
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Oct 25, 2022
@ewbankkit
Copy link
Contributor

Relates #26320.

@bschaatsbergen
Copy link
Member

Being picked up by @brittandeyoung in #27464

@github-actions
Copy link

This functionality has been released in v4.37.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 Nov 27, 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
3 participants