Guimove / terraform-aws-bastion

Terraform module which creates SSH bastion infrastructure on AWS
https://registry.terraform.io/modules/Guimove/bastion/aws
Apache License 2.0
205 stars 187 forks source link

[BUG] Parameter private_ssh_port not used in aws_lb_target_group #149

Open mirzawaqasahmed opened 1 year ago

mirzawaqasahmed commented 1 year ago

I think I have hit a bug. The private ssh port setting is not working. To make it work I have made changes to the following resources. change the public_ssh_port to private_ssh_port in:

1) resource "aws_lb_target_group" "bastion_lb_target_group" 2) In the user_data of resource "aws_launch_template" "bastion_launch_template" 3) resource "aws_security_group_rule" "ingress_bastion"

Guimove commented 1 year ago

Thank you for bringing this issue to my attention. I appreciate your feedback and investigation into the problem. It appears that there is a bug related to the private SSH port setting in the module.

To address this issue, I have made changes to the resources aws_lb_target_group.bastion_lb_target_group, the user_data of aws_launch_template.bastion_launch_template, and aws_security_group_rule.ingress_bastion. These changes seem to resolve the problem.

I encourage you to create a pull request (PR) with your changes so that the module maintainers can review and incorporate them into the codebase. By contributing your solution, you can help improve the module for other users as well.

Thank you for your contribution and for using the module. I value your input and appreciate your effort in improving its functionality.