AWS new private IP address inside my bash script

Hello guys,

I am trying to create a GHE (GitHub Enterprise) inside AWS and once it’s up and running I need to perform a few curls to install the license, settings.json file and my public key.

How can I grab the IP of this new instance during “building” time, and use this IP inside my curls commands?

packer.json file

conf.sh script

Thank you in advance

Regards

RG