linode / terraform-provider-linode

Terraform Linode provider
https://www.terraform.io/docs/providers/linode/
Mozilla Public License 2.0
202 stars 98 forks source link

Nodebalancer config doesn't properly handle check_passive #4

Closed mcg closed 6 years ago

mcg commented 6 years ago

Terraform Version

Terraform v0.11.10
+ provider.linode v1.0.0

Affected Resource(s)

Terraform Configuration Files

resource "linode_nodebalancer" "balancer" {
  label = "dev-loadbalancer"
  region = "us-central"
  client_conn_throttle = 20
}

resource "linode_nodebalancer_config" "balancer-http" {
  nodebalancer_id = "${linode_nodebalancer.balancer.id}"
  port = 80
  protocol = "http"
  check = "http"
  check_path = "/"
  check_interval = 30
  check_attempts = 3
  check_timeout = 5
  check_passive = false
  stickiness = "table"
  algorithm = "leastconn"
}

Debug Output

Debug seems to show that check_passive is excluded from the PUT request when set to false in TF.

https://gist.github.com/mcg/ed16c061e041207f3134b4d26ff3f6ef

Expected Behavior

linode_nodebalancer_config, check_passive: false successfully sets the check to false.

Actual Behavior

check_passive will remain true. However, if check_passive is manually set to false outside of Terraform and check_passive is configured as true in the Terraform, it will correctly make that change.

To clarify...

Steps to Reproduce

  1. Create a NodeBalancerConfig with check_passive: false
  2. On a clean/empty state, terraform apply
  3. Confirm that check_passive was not changed to false.
displague commented 6 years ago

Thanks for the detailed report @mcg! I'll make sure this is handled properly in 1.0.1

displague commented 6 years ago

Thanks again @mcg This has been fixed in 1.1.0

terraform init -upgrade