10 votes
Accepted

Get private key from terraform state?

If you need to use a value like this private key for later steps, the common answer is to return it as a root module output value. Since the private key is sensitive, you can mark it as such to ...
Martin Atkins's user avatar
4 votes

Get private key from terraform state?

The private key is stored in the terraform state. Typically you would show the resources with the terraform state command, but sensitive values are not shared on the screen. If you use the -json ...
Josiah's user avatar
  • 363
1 vote

Unable to pull image from a private Docker registry with Let's Encrypt certificate in Kubernetes

I had two problems. @taleodor was correct though, I needed to connect using my domain name that I had setup my certificate for. I put a copy of this question on stackoverflow as well as it seemed ...
Snorghma's user avatar
1 vote

Get private key from terraform state?

Using private_key_openssh Another option is to use terraform show -json | jq -r '.values.root_module.resources[] | select(.address=="tls_private_key.ssh").values.private_key_openssh' This ...
Evan Carroll's user avatar
  • 2,089

Only top scored, non community-wiki answers of a minimum length are eligible