Closed svopentext closed 4 years ago
resolved this issue ..Terrafrom needs all .pem certs terraform { backend "etcdv3" { endpoints = ["10.100.10.00:2379", "110.100.11:2379", "10.100.12:2379"] lock = true prefix = "at4d-terraform-state/" cacert_path = "certs/ca.pem" cert_path = "certs/client.pem" key_path = "certs/client-key.pem" } }
When I am trying to user etcd3 for terraform backend and install client cert, I am getting following error. embed: rejected connection from "10.100.100.10:61282" (error "tls: first record does not look like a TLS handshake", ServerName "")
Here are my etcd details. etcd Version: 3.4.1 Go Version: go1.12.9 Go OS/Arch: linux/amd64 Using docker Docker version 18.03.0-ce, build 0520e24
when I curl, curl --cacert ca.crt --cert client.pem --key client-key.pem https://10.100.10.11:2379 -v
Connection #0 to host 10.155.10.81 left intact
terraform file terraform { backend "etcdv3" { endpoints = ["https://10.100.10.11:2379", "https://10.100.10.12:2379", "https://10.100.10.13:2379"] lock = true cacert_path = "ca.crt" cert_path = "client.pem" key_path = "client-key.pem" prefix = "terraform-state/" }
etcdctl --endpoints https://10.100.10.11:2379,https://10.100.10.12:2379,https://10.100.10.13:2379, --key client-key.pem --cacert ca.crt --cert client.pem put foo bar OK
etcdctl --endpoints=https://10.100.10.11:2379:2379 --cacert=/opt/certs/ca.crt --cert=/opt/liaison/certs/server.crt --key=/opt/liaison/certs/server.key member list 57b20b97767c850c, started, xxx.dev, https://10.100.10.11:2380, https://10.100.10.11:2379, false b325882bdfc47769, started, xxx.dev, https://10.100.10.12:2380, https://10.100.10.12:2379, false b37664e555864dc6, started, xxx.dev, https://10.100.10.13:2380, https://10.100.10.13:2379, false Please let me know if you need more details