From 3421f922aeff925f8babb0da19c0be92252f43ec Mon Sep 17 00:00:00 2001 From: wangzepeng <65212374+Zippo-Wang@users.noreply.github.com> Date: Thu, 28 Sep 2023 16:16:23 +0800 Subject: [PATCH] docs(nat): fix docs issues (#1024) --- docs/data-sources/nat_gateway_v2.md | 7 ++++++ docs/resources/nat_dnat_rule_v2.md | 18 +++++++-------- docs/resources/nat_gateway_v2.md | 6 ++--- docs/resources/nat_snat_rule_v2.md | 36 ++++++++++++++--------------- 4 files changed, 37 insertions(+), 30 deletions(-) diff --git a/docs/data-sources/nat_gateway_v2.md b/docs/data-sources/nat_gateway_v2.md index 885bb9d3..66baed3e 100644 --- a/docs/data-sources/nat_gateway_v2.md +++ b/docs/data-sources/nat_gateway_v2.md @@ -16,6 +16,9 @@ data "flexibleengine_nat_gateway_v2" "natgateway" { ## Argument Reference +* `region` - (Optional, String) The region in which to query the data source. If omitted, the provider-level region + will be used. + * `id` - (Optional, String) Specifies the ID of the NAT gateway. * `name` - (Optional, String) Specifies the NAT gateway name. The name can contain only digits, letters, @@ -36,3 +39,7 @@ data "flexibleengine_nat_gateway_v2" "natgateway" { characters, and angle brackets (<) and (>) are not allowed. * `status` - (Optional, String) Specifies the status of the NAT gateway. + +## Attribute Reference + +All the arguments above can also be exported attributes. diff --git a/docs/resources/nat_dnat_rule_v2.md b/docs/resources/nat_dnat_rule_v2.md index e1c1ae8a..82b6bebc 100644 --- a/docs/resources/nat_dnat_rule_v2.md +++ b/docs/resources/nat_dnat_rule_v2.md @@ -44,33 +44,33 @@ resource "flexibleengine_nat_dnat_rule_v2" "dnat_2" { The following arguments are supported: -* `nat_gateway_id` - (Required) Specifies the ID of the nat gateway this dnat rule belongs to. +* `nat_gateway_id` - (Required, String, ForceNew) Specifies the ID of the nat gateway this dnat rule belongs to. Changing this creates a new dnat rule. -* `floating_ip_id` - (Required) Specifies the ID of the floating IP address. +* `floating_ip_id` - (Required, String, ForceNew) Specifies the ID of the floating IP address. Changing this creates a new dnat rule. -* `protocol` - (Required) Specifies the protocol type. Currently, +* `protocol` - (Required, String, ForceNew) Specifies the protocol type. Currently, TCP, UDP, and ANY are supported. Changing this creates a new dnat rule. -* `internal_service_port` - (Required) Specifies the port used by ECSs or BMSs to provide services +* `internal_service_port` - (Required, Int, ForceNew) Specifies the port used by ECSs or BMSs to provide services that are accessible from external systems. Changing this creates a new dnat rule. -* `external_service_port` - (Required) Specifies the port for providing services +* `external_service_port` - (Required, Int, ForceNew) Specifies the port for providing services that are accessible from external systems. Changing this creates a new dnat rule. -* `port_id` - (Optional) Specifies the port ID of an ECS or a BMS. This parameter is +* `port_id` - (Optional, String, ForceNew) Specifies the port ID of an ECS or a BMS. This parameter is mandatory in VPC scenario. Changing this creates a new dnat rule. -* `private_ip` - (Optional) Specifies the private IP address of a user, for example, +* `private_ip` - (Optional, String, ForceNew) Specifies the private IP address of a user, for example, the IP address of a VPC for dedicated connection. This parameter is mandatory in Direct Connect scenario. Changing this creates a new dnat rule. -* `description` - (Optional) Specifies the description of the dnat rule. +* `description` - (Optional, String, ForceNew) Specifies the description of the dnat rule. The value is a string of no more than 255 characters, and angle brackets (<>) are not allowed. Changing this creates a new dnat rule. -## Attributes Reference +## Attribute Reference In addition to the arguments listed above, the following computed attributes are exported: diff --git a/docs/resources/nat_gateway_v2.md b/docs/resources/nat_gateway_v2.md index 974d1e3c..74e9d6ff 100644 --- a/docs/resources/nat_gateway_v2.md +++ b/docs/resources/nat_gateway_v2.md @@ -57,7 +57,7 @@ The following arguments are supported: * `description` - (Optional, String) Specifies the description of the nat gateway. The value contains 0 to 255 characters, and angle brackets (<) and (>) are not allowed. -## Attributes Reference +## Attribute Reference In addition to all arguments above, the following attributes are exported: @@ -69,8 +69,8 @@ In addition to all arguments above, the following attributes are exported: This resource provides the following timeouts configuration options: -* `create` - Default is 10 minute. -* `delete` - Default is 10 minute. +* `create` - Default is 10 minutes. +* `delete` - Default is 10 minutes. ## Import diff --git a/docs/resources/nat_snat_rule_v2.md b/docs/resources/nat_snat_rule_v2.md index 5e737f22..cfbbd19c 100644 --- a/docs/resources/nat_snat_rule_v2.md +++ b/docs/resources/nat_snat_rule_v2.md @@ -35,41 +35,41 @@ resource "flexibleengine_nat_snat_rule_v2" "snat_2" { The following arguments are supported: -* `region` - (Optional) The region in which to obtain the V2 nat client. - If omitted, the `region` argument of the provider is used. Changing this - creates a new snat rule. +* `region` - (Optional, String, ForceNew) The region in which to obtain the V2 nat client. + If omitted, the `region` argument of the provider is used. Changing this creates a new snat rule. -* `nat_gateway_id` - (Required) ID of the nat gateway this snat rule belongs to. - Changing this creates a new snat rule. +* `nat_gateway_id` - (Required, String, ForceNew) ID of the nat gateway this snat rule belongs to. + Changing this creates a new snat rule. -* `floating_ip_id` - (Required) ID of the floating ip this snat rule connets to. - Changing this creates a new snat rule. +* `floating_ip_id` - (Required, String, ForceNew) ID of the floating ip this snat rule connets to. + Changing this creates a new snat rule. -* `subnet_id` - (Optional) ID of the VPC Subnet this snat rule connects to. - This parameter and `cidr` are alternative. Changing this creates a new snat rule. +* `subnet_id` - (Optional, String, ForceNew) ID of the VPC Subnet this snat rule connects to. + This parameter and `cidr` are alternative. Changing this creates a new snat rule. -* `cidr` - (Optional) Specifies CIDR, which can be in the format of a network segment or a host IP address. - This parameter and `subnet_id` are alternative. Changing this creates a new snat rule. +* `cidr` - (Optional, String, ForceNew) Specifies CIDR, which can be in the format of a network segment or a host IP + address. This parameter and `subnet_id` are alternative. Changing this creates a new snat rule. -* `source_type` - (Optional) Specifies the scenario. The valid value is 0 (VPC scenario) and 1 (Direct Connect scenario). - Only `cidr` can be specified over a Direct Connect connection. - If no value is entered, the default value 0 (VPC scenario) is used. - Changing this creates a new snat rule. +* `source_type` - (Optional, Int, ForceNew) Specifies the scenario. The valid value is 0 (VPC scenario) and 1 + (Direct Connect scenario). Only `cidr` can be specified over a Direct Connect connection. + If no value is entered, the default value 0 (VPC scenario) is used. Changing this creates a new snat rule. -## Attributes Reference +## Attribute Reference In addition to all arguments above, the following attributes are exported: * `id` - The resource ID in UUID format. + * `floating_ip_address` - The actual floating IP address. + * `status` - The status of the snat rule. ## Timeouts This resource provides the following timeouts configuration options: -* `create` - Default is 10 minute. -* `delete` - Default is 10 minute. +* `create` - Default is 10 minutes. +* `delete` - Default is 10 minutes. ## Import