Configure a custom SSH key for Terraform to access private Git module repositories
If you have a Terraform module in another private git repository, you need to tell Terraform which SSH key it should use. Here’s how to do so -To resolve that issue, you need to pass the SSH key as an environment variable - this environment variable can and should be marked as sensitive. In this case, we call it SSH_PRIVATE_KEY, with minor adjustmentsUsually, SSH keys look like this -
Copy
Ask AI
-----SomehexcodeAnotherhexhereYetanotherone---
When you paste it as an env zero variable, replace new lines with ;