hashicorp / terraform-provider-consul

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

consul_service check_id isn't optional as documented in registry #350

Closed const-tmp closed 1 year ago

const-tmp commented 1 year ago

Terraform Version

terraform version Terraform v1.5.3 on darwin_arm64

Terraform Configuration Files

resource "consul_service" "esm-service" {
  for_each = var.esm-services
  name = each.key
  node = consul_node.esm-node[each.value.node].name

  check {
    interval = "15s"
    name     = "${each.key} http check"
    timeout  = "1s"
    http     = "https://${consul_node.esm-node[each.value.node].address}"
  }
}

Expected Behavior

What should have happened? Resource is created with check_id equal to name as documented here

Actual Behavior

What actually happened?

╷
│ Error: Missing required argument
│
│   on consul-esm.tf line 47, in resource "consul_service" "esm-service":
│   47:   check {
│
│ The argument "check_id" is required, but no definition was found.
╵

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
remilapeyre commented 1 year ago

Hello @const-tmp, thanks for reporting this! https://github.com/hashicorp/terraform-provider-consul/pull/352 will update the documentation.