Skip to content

Commit

Permalink
Merge pull request #7 from hazelops/public_ip_var
Browse files Browse the repository at this point in the history
Added Public IP var
  • Loading branch information
igorkotof authored Jun 22, 2022
2 parents 05e8ba9 + a691d54 commit 33f7663
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ resource "aws_instance" "this" {
aws_security_group.this.id
])

associate_public_ip_address = false
associate_public_ip_address = var.public_ip_enabled

lifecycle {
ignore_changes = all
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ variable "bastion_enabled" {
description = "Gives ability to enable or disable Bastion functionality"
}

variable "public_ip_enabled" {
type = bool
default = false
description = "Enable Public IP for EC2 instance"
}

variable "ext_security_groups" {
description = "External security groups to add to bastion host"
type = list(any)
Expand Down

0 comments on commit 33f7663

Please sign in to comment.