Skip to content

Commit a742732

Browse files
committed
Add associate public ip address variable
1 parent 0917d94 commit a742732

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

modules/bastion/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ resource "aws_launch_configuration" "bastion" {
5151
instance_type = "${var.instance_type}"
5252
key_name = "${var.keypair}"
5353
user_data = "${data.template_file.user_data.rendered}"
54+
associate_public_ip_address = "${var.associate_public_ip_address}"
5455

5556
security_groups = [
5657
"${compact(concat(list(aws_security_group.bastion.id), split(",", "${var.security_group_ids}")))}",

modules/bastion/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ variable "subnet_ids" {
5151
description = "Comma separated list of subnet ids"
5252
}
5353

54+
variable "associate_public_ip_address" {
55+
description = "Associate a public ip address with an instance in a VPC."
56+
default = true
57+
}
58+
5459
variable "eip" {
5560
default = ""
5661
}

0 commit comments

Comments
 (0)