github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/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 port = 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 * `port` - (Optional) port of the rule 43 44 Fields `action`, `direction`, `ip_range`, `protocol`, `port` are editable. 45 46 ## Attributes Reference 47 48 The following attributes are exported: 49 50 * `id` - id of the new resource