github.com/greysond/terraform@v0.8.5-0.20170124173113-439b5507bbe9/website/source/docs/providers/alicloud/r/nat_gateway.html.markdown (about)

     1  ---
     2  layout: "alicloud"
     3  page_title: "Alicloud: alicloud_nat_gateway"
     4  sidebar_current: "docs-alicloud-resource-nat-gateway"
     5  description: |-
     6    Provides a resource to create a VPC NAT Gateway.
     7  ---
     8  
     9  # alicloud\_nat\_gateway
    10  
    11  Provides a resource to create a VPC NAT Gateway.
    12  
    13  ## Example Usage
    14  
    15  Basic usage
    16  
    17  ```
    18  resource "alicloud_vpc" "vpc" {
    19  	name = "tf_test_foo"
    20  	cidr_block = "172.16.0.0/12"
    21  }
    22  
    23  resource "alicloud_vswitch" "vsw" {
    24  	vpc_id = "${alicloud_vpc.vpc.id}"
    25  	cidr_block = "172.16.0.0/21"
    26  	availability_zone = "cn-beijing-b"
    27  }
    28  
    29  resource "alicloud_nat_gateway" "nat_gateway" {
    30  	vpc_id = "${alicloud_vpc.vpc.id}"
    31  	spec = "Small"
    32  	name = "test_foo"
    33  	bandwidth_packages = [{
    34  	  ip_count = 1
    35  	  bandwidth = 5
    36  	  zone = "cn-beijing-b"
    37  	}, {
    38  	  ip_count = 2
    39  	  bandwidth = 10
    40  	  zone = "cn-beijing-b"
    41  	}]
    42  	depends_on = [
    43      	"alicloud_vswitch.vsw"]
    44  }
    45  ```
    46  
    47  ## Argument Reference
    48  
    49  The following arguments are supported:
    50  
    51  * `vpc_id` - (Required, Forces New Resorce) The VPC ID.
    52  * `spec` - (Required, Forces New Resorce) The specification of the nat gateway. Valid values are `Small`, `Middle` and `Large`. Details refer to [Nat Gateway Specification](https://help.aliyun.com/document_detail/42757.html?spm=5176.doc32322.6.559.kFNBzv)
    53  * `name` - (Optional) Name of the nat gateway. The value can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Defaults to null.
    54  * `description` - (Optional) Description of the nat gateway, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Defaults to null.
    55  * `bandwidth_packages` - (Required) A list of bandwidth packages for the nat gatway.
    56  
    57  ## Block bandwidth package
    58  
    59  The bandwidth package mapping supports the following:
    60  
    61  * `ip_count` - (Required) The IP number of the current bandwidth package. Its value range from 1 to 50.
    62  * `bandwidth` - (Required) The bandwidth value of the current bandwidth package. Its value range from 5 to 5000.
    63  * `zone` - (Optional) The AZ for the current bandwidth. If this value is not specified, Terraform will set a random AZ.
    64  
    65  ## Attributes Reference
    66  
    67  The following attributes are exported:
    68  
    69  * `id` - The ID of the nat gateway.
    70  * `name` - The name of the nat gateway.
    71  * `description` - The description of the nat gateway.
    72  * `spec` - The specification of the nat gateway.
    73  * `vpc_id` - The VPC ID for the nat gateway.
    74  * `bandwidth_package_ids` - A list ID of the bandwidth packages, and split them with commas