From d7fa07b348dacf03e6c858a5cea72269863374c8 Mon Sep 17 00:00:00 2001 From: Joe Topjian Date: Mon, 31 Aug 2015 00:07:40 +0000 Subject: [PATCH] provider/openstack: ICMP Documentation Adds a note to the compute_secgroup_v2 documentation to clarify ICMP usage. --- .../r/compute_secgroup_v2.html.markdown | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/website/source/docs/providers/openstack/r/compute_secgroup_v2.html.markdown b/website/source/docs/providers/openstack/r/compute_secgroup_v2.html.markdown index 9cc532b82..959571e5f 100644 --- a/website/source/docs/providers/openstack/r/compute_secgroup_v2.html.markdown +++ b/website/source/docs/providers/openstack/r/compute_secgroup_v2.html.markdown @@ -81,3 +81,20 @@ The following attributes are exported: * `name` - See Argument Reference above. * `description` - See Argument Reference above. * `rule` - See Argument Reference above. + +## Notes + +### ICMP Rules + +When using ICMP as the `ip_protocol`, the `from_port` sets the ICMP _type_ and the `to_port` sets the ICMP _code_. To allow all ICMP types, set each value to `-1`, like so: + +``` +rule { + from_port = -1 + to_port = -1 + ip_protocol = "icmp" + cidr = "0.0.0.0/0" +} +``` + +A list of ICMP types and codes can be found [here](https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol#Control_messages).