Skip to content

Commit 3e29349

Browse files
committed
examples/complete: improve the examples
1 parent 4caa955 commit 3e29349

File tree

3 files changed

+80
-7
lines changed

3 files changed

+80
-7
lines changed

README-CN.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,47 @@ module "dnat" {
121121

122122
更多provider的使用细节,请移步[How to use provider in the module](https://www.terraform.io/docs/language/modules/develop/providers.html#passing-providers-explicitly)
123123

124-
## Terraform 版本
124+
<!-- BEGIN_TF_DOCS -->
125+
## Requirements
125126

126127
| Name | Version |
127128
|------|---------|
128-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
129-
| <a name="requirement_alicloud"></a> [alicloud](#requirement\_alicloud) | >= 1.56.0 |
129+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13 |
130+
131+
## Providers
132+
133+
| Name | Version |
134+
|------|---------|
135+
| <a name="provider_alicloud"></a> [alicloud](#provider\_alicloud) | n/a |
136+
137+
## Modules
138+
139+
No modules.
140+
141+
## Resources
142+
143+
| Name | Type |
144+
|------|------|
145+
| [alicloud_forward_entry.this](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/resources/forward_entry) | resource |
146+
| [alicloud_nat_gateways.this](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/data-sources/nat_gateways) | data source |
147+
148+
## Inputs
149+
150+
| Name | Description | Type | Default | Required |
151+
|------|-------------|------|---------|:--------:|
152+
| <a name="input_create"></a> [create](#input\_create) | Whether to create dnat entries. If true, the 'entries' should be set. | `bool` | `true` | no |
153+
| <a name="input_dnat_table_id"></a> [dnat\_table\_id](#input\_dnat\_table\_id) | The dnat table id to use on all dnat entries. | `string` | `""` | no |
154+
| <a name="input_entries"></a> [entries](#input\_entries) | A list of entries to create. Each item valid keys: 'name'(default to a string with prefix 'tf-dnat-entry' and numerical suffix), 'ip\_protocol'(default to 'any'), 'external\_ip'(if not, use root parameter 'external\_ip'), 'external\_port'(default to 'any'), 'internal\_ip'(required), 'internal\_port'(default to the 'external\_port'). | `list(map(string))` | `[]` | no |
155+
| <a name="input_external_ip"></a> [external\_ip](#input\_external\_ip) | The public ip address to use on all dnat entries. | `string` | `""` | no |
156+
| <a name="input_internal_ip"></a> [internal\_ip](#input\_internal\_ip) | The internal ip, must a private ip. | `string` | `""` | no |
157+
| <a name="input_nat_gateway_id"></a> [nat\_gateway\_id](#input\_nat\_gateway\_id) | The id of a nat gateway used to fetch the 'dnat\_table\_id'. | `string` | `""` | no |
158+
159+
## Outputs
160+
161+
| Name | Description |
162+
|------|-------------|
163+
| <a name="output_this_forward_entry_id"></a> [this\_forward\_entry\_id](#output\_this\_forward\_entry\_id) | The ID of the forward entrys |
164+
<!-- END_TF_DOCS -->
130165

131166
提交问题
132167
-------

README.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,47 @@ and then run `terraform init` and `terraform apply` to make the defined provider
129129

130130
More details see [How to use provider in the module](https://www.terraform.io/docs/language/modules/develop/providers.html#passing-providers-explicitly)
131131

132-
## Terraform versions
132+
<!-- BEGIN_TF_DOCS -->
133+
## Requirements
133134

134135
| Name | Version |
135136
|------|---------|
136-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
137-
| <a name="requirement_alicloud"></a> [alicloud](#requirement\_alicloud) | >= 1.56.0 |
137+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13 |
138+
139+
## Providers
140+
141+
| Name | Version |
142+
|------|---------|
143+
| <a name="provider_alicloud"></a> [alicloud](#provider\_alicloud) | n/a |
144+
145+
## Modules
146+
147+
No modules.
148+
149+
## Resources
150+
151+
| Name | Type |
152+
|------|------|
153+
| [alicloud_forward_entry.this](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/resources/forward_entry) | resource |
154+
| [alicloud_nat_gateways.this](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/data-sources/nat_gateways) | data source |
155+
156+
## Inputs
157+
158+
| Name | Description | Type | Default | Required |
159+
|------|-------------|------|---------|:--------:|
160+
| <a name="input_create"></a> [create](#input\_create) | Whether to create dnat entries. If true, the 'entries' should be set. | `bool` | `true` | no |
161+
| <a name="input_dnat_table_id"></a> [dnat\_table\_id](#input\_dnat\_table\_id) | The dnat table id to use on all dnat entries. | `string` | `""` | no |
162+
| <a name="input_entries"></a> [entries](#input\_entries) | A list of entries to create. Each item valid keys: 'name'(default to a string with prefix 'tf-dnat-entry' and numerical suffix), 'ip\_protocol'(default to 'any'), 'external\_ip'(if not, use root parameter 'external\_ip'), 'external\_port'(default to 'any'), 'internal\_ip'(required), 'internal\_port'(default to the 'external\_port'). | `list(map(string))` | `[]` | no |
163+
| <a name="input_external_ip"></a> [external\_ip](#input\_external\_ip) | The public ip address to use on all dnat entries. | `string` | `""` | no |
164+
| <a name="input_internal_ip"></a> [internal\_ip](#input\_internal\_ip) | The internal ip, must a private ip. | `string` | `""` | no |
165+
| <a name="input_nat_gateway_id"></a> [nat\_gateway\_id](#input\_nat\_gateway\_id) | The id of a nat gateway used to fetch the 'dnat\_table\_id'. | `string` | `""` | no |
166+
167+
## Outputs
168+
169+
| Name | Description |
170+
|------|-------------|
171+
| <a name="output_this_forward_entry_id"></a> [this\_forward\_entry\_id](#output\_this\_forward\_entry\_id) | The ID of the forward entrys |
172+
<!-- END_TF_DOCS -->
138173

139174
Submit Issues
140175
-------------

examples/complete/main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ data "alicloud_images" "default" {
66
}
77

88
data "alicloud_instance_types" "default" {
9-
availability_zone = data.alicloud_zones.default.zones[0].id
9+
availability_zone = data.alicloud_zones.default.zones[0].id
10+
cpu_core_count = 2
11+
memory_size = 8
12+
instance_type_family = "ecs.g6"
1013
}
1114

1215
module "vpc" {

0 commit comments

Comments
 (0)