Skip to content

Commit

Permalink
docs(bms): fix docs issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zippo-Wang committed Sep 8, 2023
1 parent 6d36399 commit aea8b64
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 56 deletions.
21 changes: 13 additions & 8 deletions docs/data-sources/compute_bms_flavors_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
subcategory: "Bare Metal Server (BMS)"
---

# Data Source: flexibleengine_compute_bms_flavors_v2
# flexibleengine_compute_bms_flavors_v2

Use this data source to get an available BMS Flavor.

Expand All @@ -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.

Expand Down
9 changes: 6 additions & 3 deletions docs/data-sources/compute_bms_keypairs_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
subcategory: "Bare Metal Server (BMS)"
---

# Data Source: flexibleengine_compute_bms_keypairs_v2
# flexibleengine_compute_bms_keypairs_v2

`flexibleengine_compute_bms_keypairs_v2` used to query SSH key pairs.

Expand All @@ -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.

Expand Down
21 changes: 16 additions & 5 deletions docs/data-sources/compute_bms_nic_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
subcategory: "Bare Metal Server (BMS)"
---

# Data Source: flexibleengine_compute_bms_nic_v2
# flexibleengine_compute_bms_nic_v2

`flexibleengine_compute_bms_nic_v2` used to query information about a BMS NIC based on the NIC ID.

Expand All @@ -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](#<a name="functiongraph_fixed_ips"></a>) object structure is documented below.

* `network_id` - The ID of the network to which the NIC port belongs.

<a name="functiongraph_fixed_ips"></a>
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.
34 changes: 22 additions & 12 deletions docs/data-sources/compute_bms_server_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ subcategory: "Bare Metal Server (BMS)"
---


# Data Source: flexibleengine_compute_bms_server_v2
# flexibleengine_compute_bms_server_v2

`flexibleengine_compute_bms_server_v2` used to query a BMS or BMSs details.

Expand All @@ -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.

Expand All @@ -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](#<a name="functiongraph_security_groups"></a>) object structure is documented below.

* `tags` - Specifies the BMS tag.

Expand All @@ -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.

<a name="functiongraph_security_groups"></a>
The `security_groups` block supports:

* `name` - The name of security_groups.
77 changes: 49 additions & 28 deletions docs/resources/compute_bms_server_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

* `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, Set) 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](#<a name="functiongraph_network"></a>) 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.

<a name="functiongraph_network"></a>
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:

Expand All @@ -117,3 +121,20 @@ 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.

* `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.

## Timeouts

This resource provides the following timeouts configuration options:

* `create` - Default is 30 minutes.
* `update` - Default is 30 minutes.
* `delete` - Default is 30 minutes.

0 comments on commit aea8b64

Please sign in to comment.