I have a File Provisioner configured on my packer template json:

"provisioners": [{
        "type": "file",
        "source": "packer/api-clients/database.yml",
        "destination": "/tmp/api-clients-database.yml"
    },


The code below doesn't work when I'm trying to build an AMI on Amazon AWS, 
it always says:


Bad source 'packer/api-clients/database.yml': stat 
packer/api-clients/database.yml: no such file or directory


* Bad source 
'/codebuild/output/src257534780/src/github.com/vnda/api_v2/packer/api-clients/database.yml':
 
stat 
/codebuild/output/src257534780/src/github.com/vnda/api_v2/packer/api-clients/database.yml:
 
not a directory


If I do this:


"source": "api-clients/database.yml",


It works like a charm. But I must have all my Packer files inside of a 
packer folder within my app folder for organization purposes.

What am I doing wrong?


My app folder is like this:


api_v1
├── template.json
├── app
│   ├── bin
│   ├── config
│   ├── packer
│   │   ├── api-clients
│   │   │   └── database.yml
│   ├── lib
│   ├── log
│   ├── ... 


It seems that it has something to do with Relative Paths / Absolute Paths 
on Packer but I couldn't figure out what is wrong...


Thanks in advance,


Andre

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/7b4a8839-daff-46e0-a26d-154171bf6acb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to