terraform-community-modules / tf_aws_vpc

[DEPRECATED] Use https://github.com/terraform-aws-modules/terraform-aws-vpc
Other
211 stars 203 forks source link

Add Toggle Variable for map_public_ip_on_launch #19

Closed yzguy closed 8 years ago

yzguy commented 8 years ago

Summary of Changes

This adds a new variable for map_public_ip_on_launch, with a default value of true. Having this variable allows users to toggle on/off the auto-assign public IP setting in their VPC. Currently the value is just static.

If you auto assign an IP address, the elastic IP is attached to the instance, when the instance is terminated, the elastic IP is released.

There is use cases where people may want to put an instance in a public subnet, but not auto-assign a public IP, as they may want to consciously assign a specific Elastic IP, not lose that Elastic IP when the instance is terminated, etc.