github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/google/r/compute_firewall.html.markdown (about)

     1  ---
     2  layout: "google"
     3  page_title: "Google: google_compute_firewall"
     4  sidebar_current: "docs-google-compute-firewall"
     5  description: |-
     6    Manages a firewall resource within GCE.
     7  ---
     8  
     9  # google\_compute\_firewall
    10  
    11  Manages a firewall resource within GCE.
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  resource "google_compute_firewall" "default" {
    17    name    = "test"
    18    network = "${google_compute_network.other.name}"
    19  
    20    allow {
    21      protocol = "icmp"
    22    }
    23  
    24    allow {
    25      protocol = "tcp"
    26      ports    = ["80", "8080", "1000-2000"]
    27    }
    28  
    29    source_tags = ["web"]
    30  }
    31  ```
    32  
    33  ## Argument Reference
    34  
    35  The following arguments are supported:
    36  
    37  * `name` - (Required) A unique name for the resource, required by GCE.
    38      Changing this forces a new resource to be created.
    39  
    40  * `network` - (Required) The name of the network to attach this firewall to.
    41  
    42  * `allow` - (Required) Can be specified multiple times for each allow
    43      rule. Each allow block supports fields documented below.
    44  
    45  - - -
    46  
    47  * `description` - (Optional) Textual description field.
    48  
    49  * `project` - (Optional) The project in which the resource belongs. If it
    50      is not provided, the provider project is used.
    51  
    52  * `source_ranges` - (Optional) A list of source CIDR ranges that this
    53     firewall applies to.
    54  
    55  * `source_tags` - (Optional) A list of source tags for this firewall.
    56  
    57  * `target_tags` - (Optional) A list of target tags for this firewall.
    58  
    59  The `allow` block supports:
    60  
    61  * `protocol` - (Required) The name of the protocol to allow.
    62  
    63  * `ports` - (Optional) List of ports and/or port ranges to allow. This can
    64      only be specified if the protocol is TCP or UDP.
    65  
    66  ## Attributes Reference
    67  
    68  In addition to the arguments listed above, the following computed attributes are
    69  exported:
    70  
    71  * `self_link` - The URI of the created resource.