diff --git a/README-CN.md b/README-CN.md index 68131cf..2dc9f65 100644 --- a/README-CN.md +++ b/README-CN.md @@ -121,12 +121,47 @@ module "dnat" { 更多provider的使用细节,请移步[How to use provider in the module](https://www.terraform.io/docs/language/modules/develop/providers.html#passing-providers-explicitly) -## Terraform 版本 + +## Requirements | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 0.13.0 | -| [alicloud](#requirement\_alicloud) | >= 1.56.0 | +| [terraform](#requirement\_terraform) | >= 0.13 | + +## Providers + +| Name | Version | +|------|---------| +| [alicloud](#provider\_alicloud) | n/a | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [alicloud_forward_entry.this](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/resources/forward_entry) | resource | +| [alicloud_nat_gateways.this](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/data-sources/nat_gateways) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [create](#input\_create) | Whether to create dnat entries. If true, the 'entries' should be set. | `bool` | `true` | no | +| [dnat\_table\_id](#input\_dnat\_table\_id) | The dnat table id to use on all dnat entries. | `string` | `""` | no | +| [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 | +| [external\_ip](#input\_external\_ip) | The public ip address to use on all dnat entries. | `string` | `""` | no | +| [internal\_ip](#input\_internal\_ip) | The internal ip, must a private ip. | `string` | `""` | no | +| [nat\_gateway\_id](#input\_nat\_gateway\_id) | The id of a nat gateway used to fetch the 'dnat\_table\_id'. | `string` | `""` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| [this\_forward\_entry\_id](#output\_this\_forward\_entry\_id) | The ID of the forward entrys | + 提交问题 ------- diff --git a/README.md b/README.md index cdd3ad1..2cf120b 100644 --- a/README.md +++ b/README.md @@ -129,12 +129,47 @@ and then run `terraform init` and `terraform apply` to make the defined provider More details see [How to use provider in the module](https://www.terraform.io/docs/language/modules/develop/providers.html#passing-providers-explicitly) -## Terraform versions + +## Requirements | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 0.13.0 | -| [alicloud](#requirement\_alicloud) | >= 1.56.0 | +| [terraform](#requirement\_terraform) | >= 0.13 | + +## Providers + +| Name | Version | +|------|---------| +| [alicloud](#provider\_alicloud) | n/a | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [alicloud_forward_entry.this](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/resources/forward_entry) | resource | +| [alicloud_nat_gateways.this](https://registry.terraform.io/providers/hashicorp/alicloud/latest/docs/data-sources/nat_gateways) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [create](#input\_create) | Whether to create dnat entries. If true, the 'entries' should be set. | `bool` | `true` | no | +| [dnat\_table\_id](#input\_dnat\_table\_id) | The dnat table id to use on all dnat entries. | `string` | `""` | no | +| [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 | +| [external\_ip](#input\_external\_ip) | The public ip address to use on all dnat entries. | `string` | `""` | no | +| [internal\_ip](#input\_internal\_ip) | The internal ip, must a private ip. | `string` | `""` | no | +| [nat\_gateway\_id](#input\_nat\_gateway\_id) | The id of a nat gateway used to fetch the 'dnat\_table\_id'. | `string` | `""` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| [this\_forward\_entry\_id](#output\_this\_forward\_entry\_id) | The ID of the forward entrys | + Submit Issues ------------- diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 2226e7e..1f4d9eb 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -6,7 +6,10 @@ data "alicloud_images" "default" { } data "alicloud_instance_types" "default" { - availability_zone = data.alicloud_zones.default.zones[0].id + availability_zone = data.alicloud_zones.default.zones[0].id + cpu_core_count = 2 + memory_size = 8 + instance_type_family = "ecs.g6" } module "vpc" {