Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to use instance public IP (not EIP) #10

Merged
merged 2 commits into from
Dec 14, 2016

Conversation

mieciu
Copy link
Contributor

@mieciu mieciu commented Dec 14, 2016

I found it handy to just allocate dynamic public IP instead of scripting EIP association. Please let me know what do you think.

By default set to false to maintain backwards compatibility

@antonbabenko
Copy link
Member

Good idea. I normally don't need this, because subnet where bastion host runs has "assign public IP by default = true" (in VPC). I have left minor comments and then I will merge.

@@ -44,3 +44,6 @@ variable "subnet_ids" {
variable "eip" {
default = ""
}
variable assign_public_ip {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quote var name as in other places

@@ -67,6 +67,7 @@ resource "aws_launch_configuration" "bastion" {
"${compact(concat(list(aws_security_group.bastion.id), split(",", "${var.security_group_ids}")))}"
]
iam_instance_profile = "${var.iam_instance_profile}"
associate_public_ip_address = "${var.assign_public_ip}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename assign_public_ip into associate_public_ip_address to make it as similar to name as possible

@mieciu
Copy link
Contributor Author

mieciu commented Dec 14, 2016

Thanks for a detailed review, I've updated the code

@antonbabenko antonbabenko merged commit 0f3ee2f into terraform-community-modules:master Dec 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants