Skip to content
This repository has been archived by the owner on Nov 12, 2021. It is now read-only.

Chef provisioner key/value validation happens too early and out of order #11

Open
ghost opened this issue Apr 20, 2021 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Apr 20, 2021

This issue was originally opened by @heathsnow as hashicorp/packer#8002. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


The provisioners documentation states that "The provisioners will be run in the order they are defined within the template.". I have a shell provisioner that creates the encrypted_data_bag_secret_path key value used by the chef-client provisioner.

However there seems to be some validation happening early on that checks to ensure the value entered for that key exists and it causes packer to fail with the error: "* Bad encrypted data bag secret '/etc/chef/encrypted_data_bag_secret': stat /etc/chef/encrypted_data_bag_secret: no such file or directory".

It doesn't exist because the shell provisioner right before the chef-client provisioner isn't getting a chance to run. I'd like to get my encrypted key from AWS Parameter Store with the shell script and then have the chef-client provisioner use it.

@nywilken
Copy link
Contributor

nywilken commented Nov 9, 2021

With the archival of this repository all open issues will be marked as read-only. If you wish to further discuss this plugin or any of its open issues we invite you to open a discussion on the Packer community forum.

More details on the plugin archiving process for this provisioner can be found on the Plans to Archive Unmaintained Packer Provisioner Plugins blog post.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant