hashicorp / terraform-provider-consul

Terraform Consul provider
https://www.terraform.io/docs/providers/consul/
Mozilla Public License 2.0
124 stars 113 forks source link

consul_config_entry_service_defaults panics when actually specifying defaults #381

Open simonctrlz opened 9 months ago

simonctrlz commented 9 months ago

Terraform Version

Terraform v1.6.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/consul v2.20.0
+ provider registry.terraform.io/hashicorp/local v2.2.3
+ provider registry.terraform.io/hashicorp/random v3.5.1

Affected Resource(s)

Please list the resources as a list, for example:

Terraform Configuration Files

# this works:
resource "consul_config_entry_service_defaults" "bug" {
  name = "bug"
  protocol = "http"
  expose {}
  upstream_config {}
}

# this does not:
resource "consul_config_entry_service_defaults" "bug" {
  name = "bug"
  protocol = "http"
  expose {}
  upstream_config {
    defaults {
      limits {
        max_connections = 4096
        max_pending_requests = 8192
        max_concurrent_requests = 8192
      }
    }
  }
}

Panic Output

https://gist.github.com/simonctrlz/3ce56dab47c6253a1742938a4524a829

Important Factoids

Consul v1.15.5 Once you applied an empty service default, subsequent plans or destroy attempts will fail with similar panics.