github.com/ggiamarchi/terraform@v0.3.7-0.20150607194748-ed2a66a46a71/website/source/docs/providers/azure/r/security_group.markdown (about)

     1  ---
     2  layout: "azure"
     3  page_title: "Azure: azure_security_group"
     4  sidebar_current: "docs-azure-resource-security-group"
     5  description: |-
     6    Creates a new network security group within the context of the specified subscription.
     7  ---
     8  
     9  # azure\_security\_group
    10  
    11  Creates a new network security group within the context of the specified
    12  subscription.
    13  
    14  ## Example Usage
    15  
    16  ```
    17  resource "azure_security_group" "web" {
    18      name = "webservers"
    19      location = "West US"
    20  
    21      rule {
    22          name = "HTTPS"
    23          priority = 101
    24          source_cidr = "*"
    25          source_port = "*"
    26          destination_cidr = "*"
    27          destination_port = "443"
    28          protocol = "TCP"
    29      }
    30  }
    31  ```
    32  
    33  ## Argument Reference
    34  
    35  The following arguments are supported:
    36  
    37  * `name` - (Required) The name of the security group. Changing this forces a
    38      new resource to be created.
    39  
    40  * `label` - (Optional) The identifier for the security group. The label can be
    41      up to 1024 characters long. Changing this forces a new resource to be
    42      created (defaults to the security group name)
    43  
    44  * `location` - (Required) The location/region where the security group is
    45      created. Changing this forces a new resource to be created.
    46  
    47  * `rule` - (Required) Can be specified multiple times to define multiple
    48      rules. Each `rule` block supports fields documented below.
    49  
    50  The `rule` block supports:
    51  
    52  * `name` - (Required) The name of the security rule.
    53  
    54  * `type ` - (Optional) The type of the security rule. Valid options are:
    55      `Inbound` and `Outbound` (defaults `Inbound`)
    56  
    57  * `priority` - (Required) The priority of the network security rule. Rules with
    58      lower priority are evaluated first. This value can be between 100 and 4096.
    59  
    60  * `action` - (Optional) The action that is performed when the security rule is
    61      matched. Valid options are: `Allow` and `Deny` (defaults `Allow`)
    62  
    63  * `source_cidr` - (Required) The CIDR or source IP range. An asterisk (\*) can
    64      also be used to match all source IPs.
    65  
    66  * `source_port` - (Required) The source port or range. This value can be
    67      between 0 and 65535. An asterisk (\*) can also be used to match all ports.
    68  
    69  * `destination_cidr` - (Required) The CIDR or destination IP range. An asterisk
    70      (\*) can also be used to match all destination IPs.
    71  
    72  * `destination_port` - (Required) The destination port or range. This value can
    73      be between 0 and 65535. An asterisk (\*) can also be used to match all
    74      ports.
    75  
    76  * `protocol` - (Optional) The protocol of the security rule. Valid options are:
    77      `TCP`, `UDP` and `*` (defaults `TCP`)
    78  
    79  ## Attributes Reference
    80  
    81  The following attributes are exported:
    82  
    83  * `id` - The security group ID.
    84  * `label` - The identifier for the security group.