github.com/daveadams/terraform@v0.6.4-0.20160830094355-13ce74975936/website/source/docs/providers/scaleway/r/security_group_rule.html.markdown (about) 1 --- 2 layout: "scaleway" 3 page_title: "Scaleway: security_group_rule" 4 sidebar_current: "docs-scaleway-resource-security_group_rule" 5 description: |- 6 Manages Scaleway security group rules. 7 --- 8 9 # scaleway\security_group_rule 10 11 Provides security group rules. This allows security group rules to be created, updated and deleted. 12 For additional details please refer to [API documentation](https://developer.scaleway.com/#security-groups-manage-rules). 13 14 ## Example Usage 15 16 ``` 17 resource "scaleway_security_group" "test" { 18 name = "test" 19 description = "test" 20 } 21 22 resource "scaleway_security_group_rule" "smtp_drop_1" { 23 security_group = "${scaleway_security_group.test.id}" 24 25 action = "accept" 26 direction = "inbound" 27 ip_range = "0.0.0.0/0" 28 protocol = "TCP" 29 dest_port_from = 25 30 } 31 32 ``` 33 34 ## Argument Reference 35 36 The following arguments are supported: 37 38 * `action` - (Required) action of rule (`accept`, `drop`) 39 * `direction` - (Required) direction of rule (`inbound`, `outbound`) 40 * `ip_range` - (Required) ip_range of rule 41 * `protocol` - (Required) protocol of rule (`ICMP`, `TCP`, `UDP`) 42 * `dest_port_from` - (Optional) port range from 43 * `dest_port_to` - (Optional) port from to 44 45 Field `action`, `direction`, `ip_range`, `protocol`, `dest_port_from`, `dest_port_to` are editable. 46 47 ## Attributes Reference 48 49 The following attributes are exported: 50 51 * `id` - id of the new resource