Terraform-provider-aws: aws_lb_target_group failed to enable health check

Created on 29 May 2019  ยท  7Comments  ยท  Source: hashicorp/terraform-provider-aws

terraform version: 0.11.14
plugin version: 2.12.0
aws_lb_target_group failed to enable health check, but actually health check is working:
image

code:

resource "aws_lb_target_group" "kubeingress_public" {
  name     = "whatever"
  port     = 80
  protocol = "HTTP"
  vpc_id   = "whatever"

  health_check {
    interval            = "whatever"
    path                = "whatever"
    port                = "whatever"
    healthy_threshold   = "whatever"
    unhealthy_threshold = "whatever"
    matcher             = "whatever"
  }

}

terraform apply:

Terraform will perform the following actions:

  ~ aws_lb_target_group.kubeingress_public
      health_check.0.enabled: "false" => "true"

  ~ aws_lb_target_group.kubeingress_public_api
      health_check.0.enabled: "false" => "true"


Plan: 0 to add, 2 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

aws_lb_target_group.kubeingress_public: Modifying... (ID: xxx)
  health_check.0.enabled: "false" => "true"
aws_lb_target_group.kubeingress_public_api: Modifying... (ID: xxx)
  health_check.0.enabled: "false" => "true"
aws_lb_target_group.kubeingress_public_api: Modifications complete after 1s (ID: xxx)
aws_lb_target_group.kubeingress_public: Modifications complete after 1s (ID: xxx)

Apply complete! Resources: 0 added, 2 changed, 0 destroyed.

terraform apply again:

Terraform will perform the following actions:

  ~ aws_lb_target_group.kubeingress_public
      health_check.0.enabled: "false" => "true"

  ~ aws_lb_target_group.kubeingress_public_api
      health_check.0.enabled: "false" => "true"


Plan: 0 to add, 2 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value:

bug servicelbv2

All 7 comments

I believe I also just hit this one as well. Applies, modifications complete, health check appears in console but Terraform keeps reporting it as off.

I got the same issue. Running apply repeatedly still shows the change

  ~ aws_lb_target_group.target_group_new
      health_check.0.enabled: "false" => "true"

If I manually fix the .tfstate the next refresh breaks it again.

An additional note is that the issue manifests itself only in China AWS (I tried Beijing region).
US regions do not have this issue.

I got the same issue. Running apply repeatedly still shows the change

  ~ aws_lb_target_group.target_group_new
      health_check.0.enabled: "false" => "true"

If I manually fix the .tfstate the next refresh breaks it again.

An additional note is that the issue manifests itself only in China AWS (I tried Beijing region).
US regions does not have this issue.

Confirm I'm using AWS China, I did not know global account will not hit this issue.

Can also confirm I was using Beijing. Wonder what's different, but not the first weird thing I've run into in China.

I also confirm that I have this issue, in Beijing. At each plan or a apply, the "enabled" value of the TG group heath check is detected as false, so there is always "3 to change".
Explicitly specifying "enabled = true" doesn't change anything.

Terraform v0.12.7

  • provider.aws v2.26.0

healthcheck

[EDIT]
After updating the AWS Provider to v.2.28, it worked fine. There are no more changes to be made on the plan of the apply.

I ran this command to update the provider :
terraform init -upgrade

I also confirm that I have this issue, in Beijing. At each plan or a apply, the "enabled" value of the TG group heath check is detected as false, so there is always "3 to change".
Explicitly specifying "enabled = true" doesn't change anything.

Terraform v0.12.7

  • provider.aws v2.26.0

healthcheck

[EDIT]
After updating the AWS Provider to v.2.28, it worked fine. There are no more changes to be made on the plan of the apply.

I ran this command to update the provider :
terraform init -upgrade

I guess AWS China fixed their API issue maybe, now I have no issues by change nothing...

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings