github.com/bengesoff/terraform@v0.3.1-0.20141018223233-b25a53629922/website/source/docs/providers/aws/r/security_group.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_security_group"
     4  sidebar_current: "docs-aws-resource-security-group"
     5  ---
     6  
     7  # aws\_security\_group
     8  
     9  Provides an security group resource.
    10  
    11  ## Example Usage
    12  
    13  ```
    14  resource "aws_security_group" "allow_all" {
    15      name = "allow_all"
    16  	description = "Allow all inbound traffic"
    17  
    18      ingress {
    19          from_port = 0
    20          to_port = 65535
    21          protocol = "tcp"
    22          cidr_blocks = ["0.0.0.0/0"]
    23      }
    24  }
    25  ```
    26  
    27  ## Argument Reference
    28  
    29  The following arguments are supported:
    30  
    31  * `name` - (Required) The name of the security group
    32  * `description` - (Required) The security group description.
    33  * `ingress` - (Required) Can be specified multiple times for each
    34     ingress rule. Each ingress block supports fields documented below.
    35  * `vpc_id` - (Optional) The VPC ID.
    36  * `owner_id` - (Optional) The AWS Owner ID.
    37  
    38  The `ingress` block supports:
    39  
    40  * `cidr_blocks` - (Optional) List of CIDR blocks. Cannot be used with `security_groups`.
    41  * `from_port` - (Required) The start port.
    42  * `protocol` - (Required) The protocol.
    43  * `security_groups` - (Optional) List of security group IDs. Cannot be used with `cidr_blocks`.
    44  * `self` - (Optional) If true, the security group itself will be added as
    45       a source to this ingress rule.
    46  * `to_port` - (Required) The end range port.
    47  
    48  ## Attributes Reference
    49  
    50  The following attributes are exported:
    51  
    52  * `id` - The ID of the security group
    53  * `vpc_id` - The VPC ID.
    54  * `owner_id` - The owner ID.
    55  * `name` - The name of the security group
    56  * `description` - The description of the security group
    57  * `ingress` - The ingress rules. See above for more.
    58