-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Validate aws_security_group for wrong ICMP codes #1175
Comments
I have just realized that I misread the documentation and Using
indeed sets up the rule correctly. One could still argue whether the ICMP code should be validated and the input rejected in case a wrong code is used. [1] https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml |
N/A
This seems partly related to #1487 as it turns out that in at least some regions, AWS will accept both 8/0 and 8/-1 for ICMP echo request but internally will always store it as 8/-1 as there are no other valid codes other than 0 for type 8. It would presumably require Terraform to maintain some sort of map of all of the possible ICMP type/code combinations which I'm not sure is its job. |
As far as this issue is concerned, I'd say that invalid ICMP codes should be rejected by Terraform as they are specified by a known standard. The AWS provider should then be responsible to ensure that the correct code is translated to whatever AWS uses. For example, let's consider
|
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
EDITED: see #1175 (comment)
For details about ICMP types and codes, see https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml
Terraform Version
v0.9.11
Affected Resource(s)
Terraform Configuration Files
Debug Output
For security reasons I cannot provide the entire debug output. Below is what I think is relevant for this issue.
Panic Output
None
Expected Behavior
Terraform rejects the input because the ICMP code is not valid
Actual Behavior
The port range in the security group rule in the AWS console shows
8
(i.e. the ICMP code defined in the configuration)and the EC2 instance connected to this security group is not pingable.
Steps to Reproduce
terraform plan
terraform apply
Important Factoids
I am running this using the latest AWS technology.
References
I did search for related issues but could not find any really relevant. This may be related to #222 though.
The text was updated successfully, but these errors were encountered: