Files
opentf/website/source/docs/providers/openstack/r/compute_secgrouprule.html.markdown
Jon Perritt bf92b1647f fix typo
2015-03-31 09:54:46 -06:00

2.0 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
openstack OpenStack: openstack_compute_secgrouprule docs-openstack-resource-compute-secgrouprule Manages a security group rule resource within OpenStack.

openstack_compute_secgrouprule

Manages a security group rule resource within OpenStack.

Example Usage

resource "openstack_compute_secgroup" "secgroup_1" {
  name = "my_secgroup"
  description = "my security group"
}

resource "openstack_compute_secgrouprule" "secgrouprule_1" {
    group_id = "${openstack_compute_secgroup.secgroup_1.id}"
    from_port = 22
    to_port = 22
    ip_protocol = "TCP"
    cidr = "0.0.0.0/0"
}

Argument Reference

The following arguments are supported:

  • group_id - (Required) The ID of the group to which this rule will be added. Changing this creates a new security group rule.

  • from_port - (Required) An integer representing the lower bound of the port range to open. Changing this creates a new security group rule.

  • to_port - (Required) An integer representing the upper bound of the port range to open. Changing this creates a new security group rule.

  • ip_protocol - (Required) The protocol type that will be allowed. Changing this creates a new security group rule.

  • cidr - (Optional) Required if from_group_id is empty. The IP range that will be the source of network traffic to the security group. Use 0.0.0.0./0 to allow all IP addresses. Changing this creates a new security group rule.

  • from_group_id - (Optional) Required if cidr` is empty. The ID of a group from which to forward traffic to the parent group. Changing this creates a new security group rule.

Attributes Reference

The following attributes are exported:

  • group_id - See Argument Reference above.
  • from_port - See Argument Reference above.
  • to_port - See Argument Reference above.
  • ip_protocol - See Argument Reference above.
  • cidr - See Argument Reference above.
  • from_group_id - See Argument Reference above.