Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Git SSH Authentication

If your module is located in a private git repo, you will need to provide an SSH key in your Terraform object to allow Terraform to pull your module.

apiVersion: run.terraform-operator.io/v1alpha1
kind: Terraform
...
spec:
  ...
  gitSSHKey:
    valueFrom:
      secret:
        secretName: git-ssh-key
        defaultMode: 0600

In the example above, the spec.gitSSHKey configures the SSH private key which will be picked up from a secret named git-ssh-key. The defaultMode is to set the permission on the key to 600.