github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/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 ```hcl 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 ## Argument Reference 34 35 The following arguments are supported: 36 37 * `action` - (Required) action of rule (`accept`, `drop`) 38 * `direction` - (Required) direction of rule (`inbound`, `outbound`) 39 * `ip_range` - (Required) ip_range of rule 40 * `protocol` - (Required) protocol of rule (`ICMP`, `TCP`, `UDP`) 41 * `port` - (Optional) port of the rule 42 43 Fields `action`, `direction`, `ip_range`, `protocol`, `port` are editable. 44 45 ## Attributes Reference 46 47 The following attributes are exported: 48 49 * `id` - id of the new resource