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

[Docs]: Example for security group rules show port ranges in a confusing manner #29895

Closed
TheJosh opened this issue Mar 10, 2023 · 3 comments · Fixed by #32148
Closed

[Docs]: Example for security group rules show port ranges in a confusing manner #29895

TheJosh opened this issue Mar 10, 2023 · 3 comments · Fixed by #32148
Labels
documentation Introduces or discusses updates to documentation. service/vpc Issues and PRs that pertain to the vpc service.
Milestone

Comments

@TheJosh
Copy link

TheJosh commented Mar 10, 2023

Documentation Link

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule

Description

The provided example values and also the ordering of the fields makes it look like a security group is some sort of mapping bit it isn't, instead it's a range of ports. In this case the example is for a very large 8000-port range, from port 80 all the way to port 8080. This would almost certainly not be what people would want, and in fact if it was used verbatim would be a security issue.

Suggestion would be to have both to_port and from_port be the same value, and change the field ordering so they're next to each other, e.g.

resource "aws_vpc_security_group_ingress_rule" "example" {
  security_group_id = aws_security_group.example.id

  cidr_ipv4   = "10.0.0.0/8"
  ip_protocol = "tcp"
  from_port   = 80
  to_port     = 80
}

If the desire is to show how a range of ports is supported, perhaps VNC could be used as an example, e.g.

resource "aws_vpc_security_group_ingress_rule" "vnc" {
  security_group_id = aws_security_group.example.id

  cidr_ipv4   = "10.0.0.0/8"
  ip_protocol = "tcp"
  from_port   = 5900
  to_port     = 5906
}

References

No response

Would you like to implement a fix?

None

@TheJosh TheJosh added documentation Introduces or discusses updates to documentation. needs-triage Waiting for first response or review from a maintainer. labels Mar 10, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/vpc Issues and PRs that pertain to the vpc service. label Mar 10, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Jun 13, 2023
@github-actions github-actions bot added this to the v5.6.0 milestone Jun 26, 2023
@github-actions
Copy link

This functionality has been released in v5.6.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/vpc Issues and PRs that pertain to the vpc service.
Projects
None yet
2 participants