Launch AWS EC2 instance without public IP.

20 views
Skip to first unread message

Pujitha Kondaveeti

unread,
Jan 5, 2021, 12:25:07 AM1/5/21
to Packer
Our AWS organizational policy prohibits users to spin up instances with public IP attached.
When I try to create an AWS AMI using packer I get denied by my organizational policy even though I specify associate_public_ip_address: false. 
I guess the option associate_public_ip_address is applied to the AMI created but not the `launch instance` packer instantiates for building AMI. So the launch instance is getting created with public ip associated with it causing the organizational policy to reject ec2 creation.

Is there a way to specify associate_public_ip_address:false for launch instance just like the way we have separate launch_block_device_mappings and ami_block_device_mappings ?


Thanks in advance.

Puja

Megan Marsh

unread,
Jan 5, 2021, 12:07:59 PM1/5/21
to packe...@googlegroups.com
Take a look at the ssk_interface option -- I believe that'll get you sorted out. https://www.packer.io/docs/builders/amazon-ebs#ssh_interface

--
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/f18f434e-926f-449d-bc44-82f8174f1b37n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages