Skip to content

Commit

Permalink
docs(ecs): fix docs issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Zippo-Wang committed Sep 18, 2023
1 parent e32e132 commit 0c97abc
Show file tree
Hide file tree
Showing 8 changed files with 183 additions and 122 deletions.
12 changes: 9 additions & 3 deletions docs/data-sources/availability_zones.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
subcategory: "Elastic Cloud Server (ECS)"
description: ""
page_title: "flexibleengine_availability_zones"
---

# flexibleengine_availability_zones

Use this data source to get a list of availability zones from FlexibleEngine.
Expand All @@ -10,11 +16,11 @@ data "flexibleengine_availability_zones" "zones" {}

## Argument Reference

* `region` - (Optional) The `region` to fetch availability zones from, defaults to the provider's `region`.
* `region` - (Optional, String) The `region` to fetch availability zones from, defaults to the provider's `region`.

* `state` - (Optional) The `state` of the availability zones to match, default ("available").
* `state` - (Optional, String) The `state` of the availability zones to match, default ("available").

## Attributes Reference
## Attribute Reference

`id` is set to hash of the returned zone list. In addition, the following attributes are exported:

Expand Down
27 changes: 16 additions & 11 deletions docs/data-sources/compute_instance_v2.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
subcategory: "Elastic Cloud Server (ECS)"
description: ""
page_title: "flexibleengine_compute_instance_v2"
---

# flexibleengine_compute_instance
# flexibleengine_compute_instance_v2

Use this data source to get the details of a specified compute instance.

Expand All @@ -20,15 +22,15 @@ data "flexibleengine_compute_instance_v2" "demo" {

The following arguments are supported:

* `region` - (Optional) The region in which to obtain the server instance.
* `region` - (Optional, String) The region in which to obtain the server instance.

* `name` - (Optional) Specifies the server name, which can be queried with a regular expression.
* `name` - (Optional, String) Specifies the server name, which can be queried with a regular expression.

* `fixed_ip_v4` - (Optional) Specifies the IPv4 addresses of the server.
* `fixed_ip_v4` - (Optional, String) Specifies the IPv4 addresses of the server.

* `flavor_id` - (Optional) Specifies the flavor ID.
* `flavor_id` - (Optional, String) Specifies the flavor ID.

## Attributes Reference
## Attribute Reference

In addition to all arguments above, the following attributes are exported:

Expand All @@ -38,21 +40,22 @@ In addition to all arguments above, the following attributes are exported:
* `image_name` - The image name of the instance.
* `flavor_name` - The flavor name of the instance.
* `key_pair` - The key pair that is used to authenticate the instance.
* `floating_ip` - The EIP address that is associted to the instance.
* `system_disk_id` - The system disk voume ID.
* `floating_ip` - The EIP address that is associated to the instance.
* `system_disk_id` - The system disk volume ID.
* `user_data` - The user data (information after encoding) configured during instance creation.
* `security_groups` - An array of one or more security group names
to associate with the instance.
* `network` - An array of one or more networks to attach to the instance.
The network object structure is documented below.
The [network](#ecs_attr_network) object structure is documented below.
* `block_device` - An array of one or more disks to attach to the instance.
The block_device object structure is documented below.
The [block_device](#ecs_attr_block_device) object structure is documented below.
* `scheduler_hints` - The scheduler with hints on how the instance should be launched.
The available hints are described below.
The [scheduler_hints](#ecs_attr_scheduler_hints) object structure is documented below.
* `tags` - The tags of the instance in key/value format.
* `metadata` - The metadata of the instance in key/value format.
* `status` - The status of the instance.

<a name="ecs_attr_network"></a>
The `network` block supports:

* `uuid` - The network UUID to attach to the server.
Expand All @@ -61,6 +64,7 @@ The `network` block supports:
* `fixed_ip_v4` - The fixed IPv4 address of the instance on this network.
* `fixed_ip_v6` - The Fixed IPv6 address of the instance on that network.

<a name="ecs_attr_block_device"></a>
The `block_device` block supports:

* `uuid` - The volume id on that attachment.
Expand All @@ -69,6 +73,7 @@ The `block_device` block supports:
* `type` - The volume type on that attachment.
* `pci_address` - The volume pci address on that attachment.

<a name="ecs_attr_scheduler_hints"></a>
The `scheduler_hints` block supports:

* `group` - The UUID of a Server Group where the instance will be placed into.
36 changes: 21 additions & 15 deletions docs/data-sources/compute_instances.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
subcategory: "Elastic Cloud Server (ECS)"
description: ""
page_title: "flexibleengine_compute_instances"
---

# flexibleengine_compute_instances
Expand All @@ -20,35 +22,36 @@ data "flexibleengine_compute_instances" "demo" {

The following arguments are supported:

* `region` - (Optional) The region in which to obtain the server instance.
* `region` - (Optional, String) The region in which to obtain the server instance.

* `name` - (Optional) Specifies the server name, which can be queried with a regular expression.
* `name` - (Optional, String) Specifies the server name, which can be queried with a regular expression.

* `fixed_ip_v4` - (Optional) Specifies the IPv4 addresses of the server.
* `fixed_ip_v4` - (Optional, String) Specifies the IPv4 addresses of the server.

* `flavor_id` - (Optional) Specifies the flavor ID.
* `flavor_id` - (Optional, String) Specifies the flavor ID.

* `status` - (Optional) Specifies the status of the instance. The valid values are as follows:
* `status` - (Optional, String) Specifies the status of the instance. The valid values are as follows:
+ **ACTIVE**: The instance is running properly.
+ **SHUTOFF**: The instance has been properly stopped.
+ **ERROR**: An error has occurred on the instance.

* `flavor_name` - (Optional) Specifies the flavor name of the instance.
* `flavor_name` - (Optional, String) Specifies the flavor name of the instance.

* `image_id` - (Optional) Specifies the image ID of the instance.
* `image_id` - (Optional, String) Specifies the image ID of the instance.

* `availability_zone` - (Optional) Specifies the availability zone where the instance is located.
* `availability_zone` - (Optional, String) Specifies the availability zone where the instance is located.

* `key_pair` - (Optional) Specifies the key pair that is used to authenticate the instance.
* `key_pair` - (Optional, String) Specifies the key pair that is used to authenticate the instance.

## Attributes Reference
## Attribute Reference

In addition to all arguments above, the following attributes are exported:

* `id` - Data source ID.

* `instances` - List of ECS instance details. The object structure of each ECS instance is documented below.
* `instances` - List of ECS instance details. The [instances](#ecs_attr_instances) object structure is documented below.

<a name="ecs_attr_instances"></a>
The `instances` block supports:

* `id` - The instance ID in UUID format.
Expand All @@ -67,28 +70,29 @@ The `instances` block supports:

* `key_pair` - The key pair that is used to authenticate the instance.

* `floating_ip` - The EIP address that is associted to the instance.
* `floating_ip` - The EIP address that is associated to the instance.

* `user_data` - The user data (information after encoding) configured during instance creation.

* `security_groups` - An array of one or more security group names
to associate with the instance.

* `network` - An array of one or more networks to attach to the instance.
The network object structure is documented below.
The [network](#ecs_attr_network) object structure is documented below.

* `volume_attached` - An array of one or more disks to attach to the instance.
The object structure is documented below.
The [volume_attached](#ecs_attr_volume_attached) object structure is documented below.

* `scheduler_hints` - The scheduler with hints on how the instance should be launched.
The available hints are described below.
The [scheduler_hints](#ecs_attr_scheduler_hints) object structure is documented below.

* `tags` - The tags of the instance in key/value format.

* `metadata` - The metadata of the instance in key/value format.

* `status` - The status of the instance.

<a name="ecs_attr_network"></a>
The `network` block supports:

* `uuid` - The network UUID to attach to the server.
Expand All @@ -101,12 +105,14 @@ The `network` block supports:

* `fixed_ip_v6` - The Fixed IPv6 address of the instance on that network.

<a name="ecs_attr_volume_attached"></a>
The `volume_attached` block supports:

* `volume_id` - The volume id on that attachment.

* `is_sys_volume` - Whether the volume is the system disk.

<a name="ecs_attr_scheduler_hints"></a>
The `scheduler_hints` block supports:

* `group` - The UUID of a Server Group where the instance will be placed into.
Loading

0 comments on commit 0c97abc

Please sign in to comment.