github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/alicloud/r/snat.html.markdown (about) 1 --- 2 layout: "alicloud" 3 page_title: "Alicloud: alicloud_snat_entry" 4 sidebar_current: "docs-alicloud-resource-vpc" 5 description: |- 6 Provides a Alicloud snat resource. 7 --- 8 9 # alicloud\_snat 10 11 Provides a snat 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_snat_entry" "foo" { 50 snat_table_id = "${alicloud_nat_gateway.foo.snat_table_ids}" 51 source_vswitch_id = "${alicloud_vswitch.foo.id}" 52 snat_ip = "${alicloud_nat_gateway.foo.bandwidth_packages.0.public_ip_addresses}" 53 } 54 ``` 55 ## Argument Reference 56 57 The following arguments are supported: 58 59 * `snat_table_id` - (Required, Forces new resource) The value can get from `alicloud_nat_gateway` Attributes "snat_table_ids". 60 * `source_vswitch_id` - (Required, Forces new resource) The vswitch ID. 61 * `snat_ip` - (Required) The SNAT ip address, the ip must along bandwidth package public ip which `alicloud_nat_gateway` argument `bandwidth_packages`.