From 5d1c532988bdff7c07cc9e7c96fe28b4560b8d52 Mon Sep 17 00:00:00 2001
From: wangzepeng <65212374+wangzepeng666@users.noreply.github.com>
Date: Mon, 18 Sep 2023 19:29:08 +0800
Subject: [PATCH] docs(bms): fix docs issues (#992)
---
docs/data-sources/compute_bms_flavors_v2.md | 19 +++--
docs/data-sources/compute_bms_keypairs_v2.md | 7 +-
docs/data-sources/compute_bms_nic_v2.md | 19 +++--
docs/data-sources/compute_bms_server_v2.md | 32 ++++++---
docs/resources/compute_bms_server_v2.md | 74 ++++++++++++--------
5 files changed, 99 insertions(+), 52 deletions(-)
diff --git a/docs/data-sources/compute_bms_flavors_v2.md b/docs/data-sources/compute_bms_flavors_v2.md
index 9987ee5a..9ec4f72b 100644
--- a/docs/data-sources/compute_bms_flavors_v2.md
+++ b/docs/data-sources/compute_bms_flavors_v2.md
@@ -18,23 +18,28 @@ data "flexibleengine_compute_bms_flavors_v2" "BMS_flavor" {
The arguments of this data source act as filters for querying the BMSs details.
-* `name` (Optional) - Specifies the name of the BMS flavor.
+* `region` - (Optional, String) The region in which to query the data source. If omitted, the provider-level region
+ will be used.
-* `vcpus` (Optional) - Specifies the number of CPU cores in the BMS flavor.
+* `name` (Optional, String) - Specifies the name of the BMS flavor.
-* `min_ram` (Optional) - Specifies the minimum memory size in MB. Only the BMSs with the memory size
+* `id` - (Optional, String) - The ID of the flavor.
+
+* `vcpus` (Optional, Int) - Specifies the number of CPU cores in the BMS flavor.
+
+* `min_ram` (Optional, Int) - Specifies the minimum memory size in MB. Only the BMSs with the memory size
greater than or equal to the minimum size can be queried.
-* `min_disk` (Optional) - Specifies the minimum disk size in GB. Only the BMSs with a disk size
+* `min_disk` (Optional, Int) - Specifies the minimum disk size in GB. Only the BMSs with a disk size
greater than or equal to the minimum size can be queried.
-* `sort_key` (Optional) - The sorting field. The default value is **flavorid**.
+* `sort_key` (Optional, String) - The sorting field. The default value is **flavorid**.
The available values are **name**, **memory_mb**, **vcpus**, **root_gb**, or **flavorid**.
-* `sort_dir` (Optional) - The sorting order, which can be **asc** (ascending) or **desc** (descending).
+* `sort_dir` (Optional, String) - The sorting order, which can be **asc** (ascending) or **desc** (descending).
The default value is **asc**.
-## Attributes Reference
+## Attribute Reference
All of the argument attributes are also exported as result attributes.
diff --git a/docs/data-sources/compute_bms_keypairs_v2.md b/docs/data-sources/compute_bms_keypairs_v2.md
index 5d476d13..4777f5f0 100644
--- a/docs/data-sources/compute_bms_keypairs_v2.md
+++ b/docs/data-sources/compute_bms_keypairs_v2.md
@@ -20,9 +20,12 @@ data "flexibleengine_compute_bms_keypairs_v2" "keypair" {
The arguments of this data source act as filters for querying the BMSs details.
-* `name` - (Required) - It is the key pair name.
+* `region` - (Optional, String) The region in which to query the data source. If omitted, the provider-level region
+ will be used.
-## Attributes Reference
+* `name` - (Required, String) - It is the key pair name.
+
+## Attribute Reference
All of the argument attributes are also exported as result attributes.
diff --git a/docs/data-sources/compute_bms_nic_v2.md b/docs/data-sources/compute_bms_nic_v2.md
index 7d0a0def..89fff4f3 100644
--- a/docs/data-sources/compute_bms_nic_v2.md
+++ b/docs/data-sources/compute_bms_nic_v2.md
@@ -22,18 +22,29 @@ data "flexibleengine_compute_bms_nic_v2" "nic" {
The arguments of this data source act as filters for querying the BMSs details.
-* `server_id` - (Required) - This is the unique BMS id.
+* `region` - (Optional, String) The region in which to query the data source. If omitted, the provider-level region
+ will be used.
-* `id` - (Optional) - The ID of the NIC.
+* `server_id` - (Required, String) - This is the unique BMS id.
-* `status` - (Optional) - The NIC port status.
+* `id` - (Optional, String) - The ID of the NIC.
-## Attributes Reference
+* `status` - (Optional, String) - The NIC port status.
+
+## Attribute Reference
All of the argument attributes are also exported as result attributes.
* `mac_address` - It is NIC's mac address.
* `fixed_ips` - The NIC IP address.
+ The [fixed_ips](#) object structure is documented below.
* `network_id` - The ID of the network to which the NIC port belongs.
+
+
+The `fixed_ips` block supports:
+
+* `ip_address` - Specifies the NIC private IP address.
+
+* `subnet_id` - Specifies the ID of the subnet (subnet_id) corresponding to the private IP address of the NIC.
diff --git a/docs/data-sources/compute_bms_server_v2.md b/docs/data-sources/compute_bms_server_v2.md
index a1603cb0..e711bb63 100644
--- a/docs/data-sources/compute_bms_server_v2.md
+++ b/docs/data-sources/compute_bms_server_v2.md
@@ -21,23 +21,26 @@ data "flexibleengine_compute_bms_server_v2" "server" {
The arguments of this data source act as filters for querying the BMSs details.
-* `id` - (Optional) - The unique ID of the BMS.
+* `region` - (Optional, String) The region in which to query the data source. If omitted, the provider-level region
+ will be used.
-* `user_id` (Optional) - The ID of the user to which the BMS belongs.
+* `id` - (Optional, String) - The unique ID of the BMS.
-* `name` (Optional) - The name of BMS.
+* `user_id` (Optional, String) - The ID of the user to which the BMS belongs.
-* `status` (Optional) - The BMS status.
+* `name` (Optional, String) - The name of BMS.
-* `host_status` (Optional) - The nova-compute status: **UP, UNKNOWN, DOWN, MAINTENANCE** and **Null**.
+* `status` (Optional, String) - The BMS status.
-* `key_name` (Optional) - It is the SSH key name.
+* `host_status` (Optional, String) - The nova-compute status: **UP, UNKNOWN, DOWN, MAINTENANCE** and **Null**.
-* `flavor_id` (Optional) - It gives the BMS flavor information.
+* `key_name` (Optional, String) - It is the SSH key name.
-* `image_id` (Optional) - The BMS image.
+* `flavor_id` (Optional, String) - It gives the BMS flavor information.
-## Attributes Reference
+* `image_id` (Optional, String) - The BMS image.
+
+## Attribute Reference
All of the argument attributes are also exported as result attributes.
@@ -51,9 +54,8 @@ All of the argument attributes are also exported as result attributes.
* `access_ip_v6` - This is a reserved attribute.
-* `addresses` - It gives the BMS network address.
-
* `security_groups` - The list of security groups to which the BMS belongs.
+ The [security_groups](#) object structure is documented below.
* `tags` - Specifies the BMS tag.
@@ -70,3 +72,11 @@ All of the argument attributes are also exported as result attributes.
* `hypervisor_hostname` - It is the name of a host on the hypervisor.
* `instance_name` - Instance name is specified.
+
+* `tenant_id` - Specifies the ID of the tenant owning the BMS. The value is in UUID format.
+ This parameter specifies the same meaning as project_id.
+
+
+The `security_groups` block supports:
+
+* `name` - The name of security_groups.
diff --git a/docs/resources/compute_bms_server_v2.md b/docs/resources/compute_bms_server_v2.md
index 4c301ebc..b6ccf75f 100644
--- a/docs/resources/compute_bms_server_v2.md
+++ b/docs/resources/compute_bms_server_v2.md
@@ -40,71 +40,75 @@ resource "flexibleengine_compute_bms_server_v2" "basic" {
The following arguments are supported:
-* `region` - (Optional) The region in which to create the bms server instance. If
- omitted, the `region` argument of the provider is used. Changing this
- creates a new bms server.
+* `region` - (Optional, String, ForceNew) The region in which to create the bms server instance. If
+ omitted, the `region` argument of the provider is used. Changing this will create a new bms server.
-* `name` - (Required) The name of the BMS.
+* `name` - (Required, String) The name of the BMS.
-* `image_id` - (Optional; Required if `image_name` is empty.) Changing this creates a new bms server.
+* `image_id` - (Optional, String, ForceNew) Changing this creates a new bms server. It is Required if `image_name` is
+ empty. Changing this creates a new bms server.
-* `image_name` - (Optional; Required if `image_id` is empty.) The name of the
- desired image for the bms server. Changing this creates a new bms server.
+* `image_name` - (Optional, String, ForceNew) The name of the desired image for the bms server.
+ Changing this creates a new bms server. It is Required if `image_id` is empty.
-* `flavor_id` - (Optional; Required if `flavor_name` is empty) The flavor ID of
+* `flavor_id` - (Optional, String) The flavor ID of
the desired flavor for the bms server. Changing this resizes the existing bms server.
+ It is Required if `flavor_name` is empty.
-* `flavor_name` - (Optional; Required if `flavor_id` is empty) The name of the
+* `flavor_name` - (Optional, String) The name of the
desired flavor for the bms server. Changing this resizes the existing bms server.
+ It is Required if `flavor_id` is empty.
-* `user_data` - (Optional) The user data to provide when launching the instance.
+* `user_data` - (Optional, String, ForceNew) The user data to provide when launching the instance.
Changing this creates a new bms server.
-* `security_groups` - (Optional) An array of one or more security group names
+* `security_groups` - (Optional, List) An array of one or more security group names
to associate with the bms server. Changing this results in adding/removing
security groups from the existing bms server.
-* `availability_zone` - (Required) The availability zone in which to create
- the bms server.
+* `availability_zone` - (Required, String, ForceNew) The availability zone in which to create
+ the bms server. Changing this will create a new bms server resource.
-* `network` - (Optional) An array of one or more networks to attach to the
+* `network` - (Optional, List, ForceNew) An array of one or more networks to attach to the
bms instance. Changing this creates a new bms server.
+ The [network](#) object structure is documented below.
-* `metadata` - (Optional) Metadata key/value pairs to make available from
+* `metadata` - (Optional, Map) Metadata key/value pairs to make available from
within the instance. Changing this updates the existing bms server metadata.
-* `admin_pass` - (Optional) The administrative password to assign to the bms server.
+* `admin_pass` - (Optional, String) The administrative password to assign to the bms server.
Changing this changes the root password on the existing server.
-* `key_pair` - (Optional) The name of a key pair to put on the bms server. The key
+* `key_pair` - (Optional, String, ForceNew) The name of a key pair to put on the bms server. The key
pair must already be created and associated with the tenant's account.
Changing this creates a new bms server.
-* `stop_before_destroy` - (Optional) Whether to try stop instance gracefully
+* `stop_before_destroy` - (Optional, Bool) Whether to try stop instance gracefully
before destroying it, thus giving chance for guest OS daemons to stop correctly.
If instance doesn't stop within timeout, it will be destroyed anyway.
+
The `network` block supports:
-* `uuid` - (Required unless `port` or `name` is provided) The network UUID to
- attach to the bms server. Changing this creates a new bms server.
+* `uuid` - (Optional, String, ForceNew) The network UUID to attach to the bms server.
+ Changing this creates a new bms server. It is Required unless `port` or `name` is provided
-* `name` - (Required unless `uuid` or `port` is provided) The human-readable
- name of the network. Changing this creates a new bms server.
+* `name` - (Optional, String, ForceNew) The human-readable name of the network. Changing this creates a new bms server.
+ It is Required unless `uuid` or `port` is provided.
-* `port` - (Required unless `uuid` or `name` is provided) The port UUID of a
- network to attach to the bms server. Changing this creates a new server.
+* `port` - (Optional, String, ForceNew) The port UUID of a network to attach to the bms server.
+ Changing this creates a new server.It is Required unless `uuid` or `name` is provided
-* `fixed_ip_v4` - (Optional) Specifies a fixed IPv4 address to be used on this
+* `fixed_ip_v4` - (Optional, String, ForceNew) Specifies a fixed IPv4 address to be used on this
network. Changing this creates a new bms server.
-* `fixed_ip_v6` - (Optional) Specifies a fixed IPv6 address to be used on this
+* `fixed_ip_v6` - (Optional, String, ForceNew) Specifies a fixed IPv6 address to be used on this
network. Changing this creates a new bms server.
-* `access_network` - (Optional) Specifies if this network should be used for
+* `access_network` - (Optional, Bool) Specifies if this network should be used for
provisioning access. Accepts true or false. Defaults to false.
-## Attributes Reference
+## Attribute Reference
In addition to all arguments above, the following attributes are exported:
@@ -117,3 +121,17 @@ In addition to all arguments above, the following attributes are exported:
* `user_id` - The ID of the user to which the BMS belongs.
* `host_status` - The nova-compute status: **UP, UNKNOWN, DOWN, MAINTENANCE** and **Null**.
+
+* `access_ip_v4` - This is a reserved attribute.
+
+* `access_ip_v6` - This is a reserved attribute.
+
+* `host_id` - Specifies the host ID of the BMS.
+
+## Timeouts
+
+This resource provides the following timeouts configuration options:
+
+* `create` - Default is 30 minutes.
+* `update` - Default is 30 minutes.
+* `delete` - Default is 30 minutes.