Introduction
Terraform init fails with error:
x509: certificate signed by unknown authority (possibly because of "x509:
invalid signature: parent certificate cannot sign this kind of certificate"
while trying to verify candidate authority certificate
Problem description
Make sure the machine has your root CA certificate in the store when the proxy server is used with the Terraform. Error occurs if the machine where Terraform is running doesn't have a valid certificate for the proxy server.
Internet < proxy < Terraform
Solution
Work with your Network and Unix/Linux to have the Proxy certificate added to the CA ROOT of the Terraform server.
You should be able to test with a command like the following:
curl --proxy "user:pwd@127.0.0.1:1234" "http://httpbin.org/ip"
Where the last part is the URL for the Terraform provider URL.