Hello guys,
I am trying to run this conf.sh script against my new AWS VM from my mac laptop.
When the VM is up and running I am using this AWS command to grab the IP, however, from inside packer, I am not able to grab it, only from my shell terminal.
Can you see the problem?
If is there any better way to achieve it just let me know.
Packer.json
Conf.sh:
Error:
==> amazon-ebs: Pausing at breakpoint provisioner with note “this is a breakpoint 1”.
==> amazon-ebs: Press enter to continue.
==> amazon-ebs: Running local shell script: /var/folders/9q/pzl_rvls7svbpv86bfcydrsc0000gn/T/packer-shell332274264
amazon-ebs: i-086b22975ad9648ed
==> amazon-ebs: Pausing at breakpoint provisioner with note “this is a breakpoint 2”.
==> amazon-ebs: Press enter to continue.
==> amazon-ebs: Running local shell script: /var/folders/9q/pzl_rvls7svbpv86bfcydrsc0000gn/T/packer-shell839414416
amazon-ebs:
==> amazon-ebs: Pausing at breakpoint provisioner with note “this is a breakpoint 3”.
==> amazon-ebs: Press enter to continue.
==> amazon-ebs: Running local shell script: ./conf.sh
==> amazon-ebs: % Total % Received % Xferd Average Speed Time Time Time Current
==> amazon-ebs: Dload Upload Total Spent Left Speed
==> amazon-ebs: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0curl: (6) Could not resolve host: $AWS_INSTANCE_IP
==> amazon-ebs: % Total % Received % Xferd Average Speed Time Time Time Current
==> amazon-ebs: Dload Upload Total Spent Left Speed
==> amazon-ebs: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0curl: (6) Could not resolve host: $AWS_INSTANCE_IP
==> amazon-ebs: Provisioning step had errors: Running the cleanup provisioner, if present…
==> amazon-ebs: Terminating the source AWS instance…
==> amazon-ebs: Cleaning up any extra volumes…
==> amazon-ebs: No volumes to clean up, skipping
Build ‘amazon-ebs’ errored: Script exited with non-zero exit status: 6.Allowed exit codes are: [0]
==> Some builds didn’t complete successfully and had errors:
–> amazon-ebs: Script exited with non-zero exit status: 6.Allowed exit codes are: [0]
==> Builds finished but no artifacts were created.
❯ AWS (master) ✘
Regards
RG