coreos / terraform-aws-kubernetes

Install a Kubernetes cluster the CoreOS Tectonic Way: HA, self-hosted, RBAC, etcd Operator, and more
Apache License 2.0
117 stars 67 forks source link

Fail when try to use autogenerated cert #13

Closed thunderbird86 closed 6 years ago

thunderbird86 commented 6 years ago

Error: Error refreshing state: 1 error(s) occurred:

* module.kubernetes.module.kube_certs.output.id: At column 5, line 2: join: argument 1 should be type list, got type string in:

${sha1("
  ${join(" ",
    local_file.apiserver_key.id,
    local_file.apiserver_crt.id,
    local_file.kube_ca_key.id,
    local_file.kube_ca_crt.id,
    local_file.kubelet_key.id,
    local_file.kubelet_crt.id,
    )}
  ")}

i was fixed in this way

output "id" {
  value = "${sha1(join(" ", var.ca_list))}"
}

variable "ca_list" {
  type = "list"
  default = [
    "local_file.apiserver_key.id",
    "local_file.apiserver_crt.id",
    "local_file.kube_ca_key.id",
    "local_file.kube_ca_crt.id",
    "local_file.kubelet_key.id",
    "local_file.kubelet_crt.id",
  ]
}
jturolla commented 6 years ago

Had the same issue in current master fb5c6c70b74ce60f3face81dc8cadafe5597645d

squat commented 6 years ago

Yes this is a new issue due to syntax changes in Terraform 0.11.x. Update is coming soon in upstream.

squat commented 6 years ago

closed in https://github.com/coreos/terraform-aws-kubernetes/releases/tag/1.8.4-tectonic.3