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

     1  ---
     2  layout: "alicloud"
     3  page_title: "Alicloud: alicloud_forward_entry"
     4  sidebar_current: "docs-alicloud-resource-vpc"
     5  description: |-
     6    Provides a Alicloud forward resource.
     7  ---
     8  
     9  # alicloud\_forward
    10  
    11  Provides a forward resource.
    12  
    13  ## Example Usage
    14  
    15  Basic Usage
    16  
    17  ```
    18  resource "alicloud_vpc" "foo" {
    19    ...
    20  }
    21  
    22  resource "alicloud_vswitch" "foo" {
    23    ...
    24  }
    25  
    26  resource "alicloud_nat_gateway" "foo" {
    27    vpc_id = "${alicloud_vpc.foo.id}"
    28    spec   = "Small"
    29    name   = "test_foo"
    30  
    31    bandwidth_packages = [
    32      {
    33        ip_count  = 2
    34        bandwidth = 5
    35        zone      = ""
    36      },
    37      {
    38        ip_count  = 1
    39        bandwidth = 6
    40        zone      = "cn-beijing-b"
    41      }
    42    ]
    43  
    44    depends_on = [
    45      "alicloud_vswitch.foo",
    46    ]
    47  }
    48  
    49  resource "alicloud_forward_entry" "foo" {
    50    forward_table_id = "${alicloud_nat_gateway.foo.forward_table_ids}"
    51    external_ip      = "${alicloud_nat_gateway.foo.bandwidth_packages.0.public_ip_addresses}"
    52    external_port    = "80"
    53    ip_protocol      = "tcp"
    54    internal_ip      = "172.16.0.3"
    55    internal_port    = "8080"
    56  }
    57  
    58  ```
    59  ## Argument Reference
    60  
    61  The following arguments are supported:
    62  
    63  * `forward_table_id` - (Required, Forces new resource) The value can get from `alicloud_nat_gateway` Attributes "forward_table_ids".
    64  * `external_ip` - (Required, Forces new resource) The external ip address, the ip must along bandwidth package public ip which `alicloud_nat_gateway` argument `bandwidth_packages`.
    65  * `external_port` - (Required) The external port, valid value is 1~65535|any.
    66  * `ip_protocol` - (Required) The ip protocal, valid value is tcp|udp|any.
    67  * `internal_ip` - (Required) The internal ip, must a private ip.
    68  * `internal_port` - (Required) The internal port, valid value is 1~65535|any.