AWS new private IP address inside my bash script

11 views
Skip to first unread message

Renato Marcandier

unread,
Jul 24, 2020, 2:06:44 PM7/24/20
to Packer

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

https://gist.github.com/rmarcandier/64786b129b0e936042961f2007879a78


conf.sh script

https://gist.github.com/rmarcandier/9e412169656b7b17f154251c4c8bf338



Thank you in advance

Regards

RG

Tarun Mittal

unread,
Jul 24, 2020, 2:23:01 PM7/24/20
to packe...@googlegroups.com
You can use ifconfig or other Linux commands to find and then do little bit of cut,grep,awk on results and save them in variable and use it in curl command


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/d17d1e39-7fc7-49ca-b9d2-e1f102fe952co%40googlegroups.com.

Note: This message is the property of HashedIn and its subsidiaries. It may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message.
Reply all
Reply to author
Forward
0 new messages