magenx / Magento-2-aws-cluster-terraform

Magento 2 AWS autoscaling cluster with Terraform and Packer or ImageBuilder. Adobe Commerce Cloud alternative. The best ecommerce infrastructure. Drive more sales online. Transparent billing. Developer-friendly. No hidden bottlenecks.
https://www.magenx.com
123 stars 41 forks source link

AWS Cloudshell has its own "packer" binary #17

Open youanden opened 2 years ago

youanden commented 2 years ago

I tried following the instructions using the AWS Cloudshell and ran into an error during terraform apply asking whether I forgot to run packer init.

Turns out, which packer returns /usr/sbin/packer instead of /usr/bin/packer.

I manually cd'd into magento/packer and ran /usr/bin/packer init packer.pkr.hcl, re-ran terraform apply from the magento folder to success.

magenx commented 2 years ago

never had this problem but yes, the packer is on a different path,

magenx commented 2 years ago

https://learn.hashicorp.com/tutorials/packer/get-started-install-cli

On some distributions, there may be another tool named packer installed by default. The following error indicates that there is a name conflict.

To fix this, create a symlink to packer that uses a different name like packer.io, or invoke the packer binary you want using its absolute path, e.g. /usr/bin/packer