title: Copy File(s) From Local Machine to AWS EC2 CoreOS Machine(s) Via Terraform
body: <p>I am trying to copy some file(s) over from my local box to a created CoreOS machine via Terraform (in a "main.tf" file).  I have tried different permutations of the provisioner block to no avail.  For example, for this I get "unable to authenticate" when I nest this block inside a resource "aws_autoscaling_group" "myfoo" {...} block:</p>
  
  <pre><code>  provisioner "file" {
      source      = "foo.txt"
      destination = "/etc/foo.txt"
  
      connection {
        user     = "root"
        private_key = "${file("~/.ssh/mykeyfile.pem")}"
      }
    }
  </code></pre>
  
  <p>The error I get is:</p>
  
  <pre><code>...
  aws_autoscaling_group.myfoo: Still creating... (30s elapsed)
  aws_autoscaling_group.myfoo: Provisioning with 'file'...
  aws_autoscaling_group.myfoo: Still creating... (40s elapsed)
  ...
  aws_autoscaling_group.myfoo: Still creating... (5m10s elapsed)
  aws_autoscaling_group.myfoo: Still creating... (5m20s elapsed)
  aws_autoscaling_group.myfoo: Still creating... (5m30s elapsed)
  
  Error: Error applying plan:
  
  1 error(s) occurred:
  
  * aws_autoscaling_group.myfoo: 1 error(s) occurred:
  
  * ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
  </code></pre>
  
  <p>The file(s) are security files, and I don't want to bake them into a Docker image.  Also, since they are security files I don't want to use write_files in the cloud-config.template.yaml to write them out.  Perhaps there is another way to do this within the Cloud Config? Thanks.</p>