Packer: failed to interpolate a variable

Created on 6 Aug 2019  ยท  3Comments  ยท  Source: hashicorp/packer

Hi,

I am not able to use vault in my build :disappointed_relieved: .

Do I miss something ?

$ packer version
Packer v1.4.2
$ uname -srvmo
Linux 5.2.3-arch1-1-ARCH #1 SMP PREEMPT Fri Jul 26 08:13:47 UTC 2019 x86_64 GNU/Linux
$ cat build.json 
{
    "variables": {
        "cert": "{{vault `kv/kvm-06` `svc-sudop`}}"
    },
    "builders": [{
        "type": "docker",
        "image": "alpine:3.9",
        "commit": "true"
    }],
    "provisioners": [{
        "type": "shell",
        "inline": "ls"
    }]
}
$ packer validate build.json 
Error initializing core: Failed to interpolate "cert": "{{vault `kv/kvm-06` `svc-sudop`}}": Please make sure that the variable you're referencing has been defined; Packer treats all variables used to interpolate other user varaibles as required.

logs

integratiovault question

All 3 comments

I recently merged code that'll at least give you a more useful error message about what you're facing: https://github.com/hashicorp/packer/pull/7854. If you want the branch build for that PR you can download it here.

Oh yeah. Thanks for this PR, it's easier to debug !

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings