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

Add source_dest_check argoument in aws_instance resource #241

Open
bsramin opened this issue Oct 23, 2024 · 0 comments · May be fixed by #242
Open

Add source_dest_check argoument in aws_instance resource #241

bsramin opened this issue Oct 23, 2024 · 0 comments · May be fixed by #242

Comments

@bsramin
Copy link

bsramin commented Oct 23, 2024

Describe the Feature

In order to flexibly use the bastion host to navigate inside the vpc
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#source_dest_check

Expected Behavior

Being able in the module setup to set it to false

module "ec2-bastion-server" {
  source        = "cloudposse/ec2-bastion-server/aws"
  ...
  source_dest_check = false
}

Use Case

A subnet router must be able to send and receive traffic when the source or destination is not itself. In the case I use the bastion as a subnet router.

Describe Ideal Solution

Add source_dest_check variable with true value default, and in aws_instance set

variable "source_dest_check" {
  type        = string
  description = "Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs."
  default     = true
}
resource "aws_instance" "default" {
  ...
  source_dest_check               = var.source_dest_check
  ...

Alternatives Considered

No response

Additional Context

No response

@bsramin bsramin linked a pull request Oct 23, 2024 that will close this issue
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 a pull request may close this issue.

1 participant