title: How can I deploy repository using Terraform
body: <p>I don't understand the way for make a git clone of my private gitlab repository into ec2 instance when I deploy using terraform.</p>
  
  <p>I have a deploy.sh file where i have :</p>
  
  <pre><code>sudo apt-get update
  sudo apt-get install git
  git clone git@gitlab.com:myapp/myrepo.git
  </code></pre>
  
  <p>I use a ssh key for pull or push repository.</p>
  
  <p>How i define or registry the ssh key from new ec2 instance created from terraform script?</p>
  
  <p>I already trying using provisioner "file", but i use a ELB  with autoscaling group and i can't connect via ssh to copy files from my local machine to new ec2 instance, always y get "port 22: Connection refused".</p>