From 193cddbbfb5731deae602aecd2bf33fac6662030 Mon Sep 17 00:00:00 2001
From: wangzepeng <65212374+wangzepeng666@users.noreply.github.com>
Date: Tue, 12 Sep 2023 20:33:34 +0800
Subject: [PATCH] docs(dws): fix docs issues (#1005)
---
docs/data-sources/dws_flavors.md | 37 +++++++++--
.../gaussdb_cassandra_instances.md | 29 +++++++--
docs/resources/dws_cluster_v1.md | 61 ++++++++++++-------
docs/resources/gaussdb_cassandra_instance.md | 26 ++++++--
docs/resources/gaussdb_influx_instance.md | 26 ++++++--
..._source_flexibleengine_dws_flavors_test.go | 23 +++++++
6 files changed, 161 insertions(+), 41 deletions(-)
diff --git a/docs/data-sources/dws_flavors.md b/docs/data-sources/dws_flavors.md
index d2b8e062..3689f0ca 100644
--- a/docs/data-sources/dws_flavors.md
+++ b/docs/data-sources/dws_flavors.md
@@ -25,19 +25,48 @@ data "flexibleengine_dws_flavors" "flavor" {
* `memory` - (Optional, String) Specifies the ram of the DWS node flavor in GB.
-## Attributes Reference
+* `datastore_type` - (Optional, String) The type of datastore. The options are as follows:
+ - **dws**: OLAP, elastic scaling, unlimited scaling of compute and storage capacity.
+ - **hybrid**: a single data warehouse used for transaction and analytics workloads,
+ in single-node or cluster mode.
+ - **stream**: built-in time series operators; up to 40:1 compression ratio; applicable to IoT services.
+
+## Attribute Reference
In addition to all arguments above, the following attributes are exported:
* `id` - Indicates a data source ID.
-* `flavors` - Indicates the flavors information. Structure is documented below.
+* `flavors` - Indicates the flavors information. The [flavors](#dws_flavors) object structure is documented below.
-The `flavors` block contains:
+
+The `flavors` block supports:
* `flavor_id` - The name of the DWS node flavor. It is referenced by **node_type** in `flexibleengine_dws_cluster_v1`.
+
* `vcpus` - Indicates the vcpus of the DWS node flavor.
+
* `memory` - Indicates the ram of the DWS node flavor in GB.
+
* `volumetype` - Indicates Disk type.
+
* `size` - Indicates the Disk size in GB.
-* `availability_zone` - Indicates the availability zone where the node resides.
+
+* `availability_zones` - Indicates the availability zone where the node resides.
+
+* `datastore_type` - The type of datastore.The options are as follows:
+ - **dws**: OLAP, elastic scaling, unlimited scaling of compute and storage capacity.
+ - **hybrid**: a single data warehouse used for transaction and analytics workloads,
+ in single-node or cluster mode.
+ - **stream**: built-in time series operators; up to 40:1 compression ratio; applicable to IoT services.
+
+* `elastic_volume_specs` - The [elastic_volume_specs](#dws_elastic_volume_specs) object structure is documented below.
+
+
+The `elastic_volume_specs` block supports:
+
+* `step` - Disk size increment step.
+
+* `min_size` - Minimum disk size.
+
+* `max_size` - Maximum disk size.
diff --git a/docs/data-sources/gaussdb_cassandra_instances.md b/docs/data-sources/gaussdb_cassandra_instances.md
index cd541d9c..5876d4b4 100644
--- a/docs/data-sources/gaussdb_cassandra_instances.md
+++ b/docs/data-sources/gaussdb_cassandra_instances.md
@@ -25,16 +25,20 @@ data "flexibleengine_gaussdb_cassandra_instances" "this" {
* `subnet_id` - (Optional, String) Specifies the network ID of a subnet.
-## Attributes Reference
+## Attribute Reference
In addition to all arguments above, the following attributes are exported:
* `id` - Indicates the ID of the data source.
-* `instances` - An array of available instances.
+* `instances` - An array of available instances. The [instances](#gaussdb_instances) object structure is documented
+ below.
+
The `instances` block supports:
+* `id` - The id of the instance.
+
* `region` - The region of the instance.
* `name` - Indicates the name of the instance.
@@ -65,30 +69,43 @@ The `instances` block supports:
* `private_ips` - Indicates the list of private IP address of the nodes.
-* `datastore` - Indicates the database information. Structure is documented below.
+* `datastore` - Indicates the database information. The [datastore](#gaussdb_datastore) object structure is documented
+ below.
-* `backup_strategy` - Indicates the advanced backup policy. Structure is documented below.
+* `backup_strategy` - Indicates the advanced backup policy. The [backup_strategy](#gaussdb_backup_strategy) object
+ structure is documented below.
-* `nodes` - Indicates the instance nodes information. Structure is documented below.
+* `nodes` - Indicates the instance nodes information. The [nodes](#gaussdb_nodes) object structure is documented below.
* `tags` - Indicates the key/value tags of the instance.
+
The `datastore` block supports:
* `engine` - Indicates the database engine.
+
* `storage_engine` - Indicates the database storage engine.
+
* `version` - Indicates the database version.
+
The `backup_strategy` block supports:
* `start_time` - Indicates the backup time window.
+
* `keep_days` - Indicates the number of days to retain the generated
-The `nodes` block contains:
+
+The `nodes` block supports:
* `id` - Indicates the node ID.
+
* `name` - Indicates the node name.
+
* `private_ip` - Indicates the private IP address of a node.
+
* `status` - Indicates the node status.
+
* `support_reduce` - Indicates whether the node support reduce.
+
* `availability_zone` - Indicates the availability zone where the node resides.
diff --git a/docs/resources/dws_cluster_v1.md b/docs/resources/dws_cluster_v1.md
index 0b0f7d4a..cb2ce4de 100644
--- a/docs/resources/dws_cluster_v1.md
+++ b/docs/resources/dws_cluster_v1.md
@@ -50,61 +50,71 @@ resource "flexibleengine_dws_cluster_v1" "cluster" {
The following arguments are supported:
-* `name` - (Required) Cluster name, which must be unique and contains 4 to 64
- characters, which consist of letters, digits, hyphens (-), or underscores
- (_) only and must start with a letter.
+* `region` - (Optional, String, ForceNew) Specifies the region in which to create the DWS cluster (v1) resource.
+ If omitted, the provider-level region will be used. Changing this will create a new DWS cluster (v1) resource.
-* `node_type` - (Required) Node type.
+* `name` - (Required, String, ForceNew) Cluster name, which must be unique and contains 4 to 64
+ characters, which consist of letters, digits, hyphens (-), or underscores(_) only and must start with a letter.
+ Changing this will create a new resource.
-* `number_of_node` - (Required) Number of nodes in a cluster. The value ranges
- from 3 to 32.
+* `node_type` - (Required, String, ForceNew) Node type.Changing this will create a new resource.
-* `user_name` - (Required) Administrator username for logging in to a data
+* `number_of_node` - (Required, Int, ForceNew) Number of nodes in a cluster. The value ranges from 3 to 32.
+ Changing this will create a new resource.
+
+* `user_name` - (Required, String, ForceNew) Administrator username for logging in to a data
warehouse cluster The administrator username must:
- Consist of lowercase letters, digits, or underscores.
- Start with a lowercase letter or an underscore.
- Contain 1 to 63 characters.
- Cannot be a keyword of the DWS database.
+ Changing this will create a new resource.
-* `user_pwd` - (Required) Administrator password for logging in to a data
+* `user_pwd` - (Required, String, ForceNew) Administrator password for logging in to a data
warehouse cluster. A password must conform to the following rules:
- Contains 8 to 32 characters.
- Cannot be the same as the username or the username written in reverse order.
- Contains three types of lowercase letters, uppercase letters, digits and
special characters ~!@#%^&*()-_=+|[{}];:,<.>/?
+ Changing this will create a new resource.
-* `vpc_id` - (Required) VPC ID, which is used for configuring cluster network.
+* `vpc_id` - (Required, String, ForceNew) VPC ID, which is used for configuring cluster network.
+ Changing this will create a new resource.
-* `subnet_id` - (Required) The ID of the VPC Subnet, which is used for configuring cluster network.
+* `subnet_id` - (Required, String, ForceNew) The ID of the VPC Subnet, which is used for configuring cluster network.
+ Changing this will create a new resource.
-* `security_group_id` - (Required) ID of a security group. The ID is used for
- configuring cluster network.
+* `security_group_id` - (Required, String, ForceNew) ID of a security group. The ID is used for
+ configuring cluster network. Changing this will create a new resource.
-* `port` - (Optional) Service port of a cluster (8000 to 10000). The default value is 8000.
+* `port` - (Optional, Int, ForceNew) Service port of a cluster (8000 to 10000). The default value is 8000.
+ Changing this will create a new resource.
-* `availability_zone` - (Optional) AZ in a cluster.
+* `availability_zone` - (Optional, String, ForceNew) AZ in a cluster.Changing this will create a new resource.
-* `public_ip` - (Optional) Public IP address. The object structure is documented below.
+* `public_ip` - (Optional, List, ForceNew) Public IP address.The [public_ip](#dws_public_ip) object structure is
+ documented below. Changing this will create a new resource.
+
The `public_ip` block supports:
-* `public_bind_type` - (Optional) Binding type of an EIP. The value can be
+* `public_bind_type` - (Optional, String, ForceNew) Binding type of an EIP. The value can be
either of the following: *auto_assign*, *not_use* and *bind_existing*.
- The default value is *not_use*.
+ The default value is *not_use*. Changing this will create a new resource.
-* `eip_id` - (Optional) EIP ID
+* `eip_id` - (Optional, String, ForceNew) EIP ID. Changing this will create a new resource.
-## Attributes Reference
+## Attribute Reference
In addition to all arguments above, the following attributes are exported:
* `id` - Cluster ID
* `endpoints` - The private network connection information about the cluster.
- The object structure is documented below.
+ The [endpoints](#dws_endpoints) object structure is documented below.
* `public_endpoints` - The public network connection information about the cluster.
- The object structure is documented below.
+ The [public_endpoints](#dws_public_endpoints) object structure is documented below.
* `private_ip` - List of private network IP address.
@@ -120,6 +130,7 @@ In addition to all arguments above, the following attributes are exported:
* `updated` - Last modification time of a cluster. The format is ISO8601:YYYY-MM-DDThh:mm:ssZ.
+
The `endpoints` block supports:
* `connect_info` - Private network connection information
@@ -127,6 +138,7 @@ The `endpoints` block supports:
* `jdbc_url` - JDBC URL. The following is the default format:
jdbc:postgresql://< connect_info>/
+
The `public_endpoints` block supports:
* `public_connect_info` - Public network connection information
@@ -134,6 +146,13 @@ The `public_endpoints` block supports:
* `jdbc_url` - JDBC URL. The following is the default format:
jdbc:postgresql://< public_connect_info>/
+## Timeouts
+
+This resource provides the following timeouts configuration options:
+
+* `create` - Default is 30 minutes.
+* `delete` - Default is 30 minutes.
+
## Import
DWS cluster can be imported using the `id`, e.g.
diff --git a/docs/resources/gaussdb_cassandra_instance.md b/docs/resources/gaussdb_cassandra_instance.md
index 6bb58d3b..34c451c7 100644
--- a/docs/resources/gaussdb_cassandra_instance.md
+++ b/docs/resources/gaussdb_cassandra_instance.md
@@ -93,13 +93,15 @@ The following arguments are supported:
* `force_import` - (Optional, Bool) If specified, try to import the instance instead of creating if the name already
existed.
-* `datastore` - (Optional, List, ForceNew) Specifies the database information. Structure is documented below. Changing
- this parameter will create a new resource.
+* `datastore` - (Optional, List, ForceNew) Specifies the database information. The [datastore](#gaussdb_datastore)
+ object structure is documented below. Changing this parameter will create a new resource.
-* `backup_strategy` - (Optional, List) Specifies the advanced backup policy. Structure is documented below.
+* `backup_strategy` - (Optional, List) Specifies the advanced backup policy. The [backup_strategy](#gaussdb_backup_strategy)
+ object structure is documented below.
* `tags` - (Optional, Map) The key/value pairs to associate with the instance.
+
The `datastore` block supports:
* `engine` - (Required, String, ForceNew) Specifies the database engine. Only "GeminiDB-Cassandra" is supported now.
@@ -111,6 +113,7 @@ The `datastore` block supports:
* `storage_engine` - (Required, String, ForceNew) Specifies the storage engine. Only "rocksDB" is supported now.
Changing this parameter will create a new resource.
+
The `backup_strategy` block supports:
* `start_time` - (Required, String) Specifies the backup time window. Automated backups will be triggered during the
@@ -127,21 +130,34 @@ The `backup_strategy` block supports:
In addition to all arguments above, the following attributes are exported:
* `id` - Indicates the DB instance ID.
+
* `status` - Indicates the DB instance status.
+
* `port` - Indicates the database port.
+
* `mode` - Indicates the instance type.
+
* `db_user_name` - Indicates the default username.
-* `nodes` - Indicates the instance nodes information. Structure is documented below.
+
+* `nodes` - Indicates the instance nodes information. The [nodes](#gaussdb_nodes) object structure is documented below.
+
* `private_ips` - Indicates the IP address list of the db.
+
* `lb_ip_address` - Indicates the LB IP address of the db.
+
* `lb_port` - Indicates the LB port of the db.
-The `nodes` block contains:
+
+The `nodes` block supports:
* `id` - Indicates the node ID.
+
* `name` - Indicates the node name.
+
* `status` - Indicates the node status.
+
* `support_reduce` - Indicates whether the node support reduce or not.
+
* `private_ip` - Indicates the private IP address of a node.
## Timeouts
diff --git a/docs/resources/gaussdb_influx_instance.md b/docs/resources/gaussdb_influx_instance.md
index d724c90d..f79dfaa4 100644
--- a/docs/resources/gaussdb_influx_instance.md
+++ b/docs/resources/gaussdb_influx_instance.md
@@ -94,13 +94,15 @@ The following arguments are supported:
* `force_import` - (Optional, Bool) If specified, try to import the instance instead of creating if the name already
existed.
-* `datastore` - (Optional, List, ForceNew) Specifies the database information. Structure is documented below. Changing
- this parameter will create a new resource.
+* `datastore` - (Optional, List, ForceNew) Specifies the database information. The [datastore](#gaussdb_datastore)
+ object structure is documented below. Changing this parameter will create a new resource.
-* `backup_strategy` - (Optional, List) Specifies the advanced backup policy. Structure is documented below.
+* `backup_strategy` - (Optional, List) Specifies the advanced backup policy. The [backup_strategy](#gaussdb_backup_strategy)
+ object structure is documented below.
* `tags` - (Optional, Map) The key/value pairs to associate with the instance.
+
The `datastore` block supports:
* `engine` - (Required, String, ForceNew) Specifies the database engine. Only **influxdb** is supported now.
@@ -112,6 +114,7 @@ The `datastore` block supports:
* `storage_engine` - (Required, String, ForceNew) Specifies the storage engine. Only **rocksDB** is supported now.
Changing this parameter will create a new resource.
+
The `backup_strategy` block supports:
* `start_time` - (Required, String) Specifies the backup time window. Automated backups will be triggered during the
@@ -128,21 +131,34 @@ The `backup_strategy` block supports:
In addition to all arguments above, the following attributes are exported:
* `id` - Indicates the DB instance ID.
+
* `status` - Indicates the DB instance status.
+
* `port` - Indicates the database port.
+
* `mode` - Indicates the instance type.
+
* `db_user_name` - Indicates the default username.
-* `nodes` - Indicates the instance nodes information. Structure is documented below.
+
+* `nodes` - Indicates the instance nodes information. The [nodes](#gaussdb_nodes) object structure is documented below.
+
* `private_ips` - Indicates the IP address list of the db.
+
* `lb_ip_address` - Indicates the LB IP address of the db.
+
* `lb_port` - Indicates the LB port of the db.
-The `nodes` block contains:
+
+The `nodes` block supports:
* `id` - Indicates the node ID.
+
* `name` - Indicates the node name.
+
* `status` - Indicates the node status.
+
* `support_reduce` - Indicates whether the node support reduce or not.
+
* `private_ip` - Indicates the private IP address of a node.
## Timeouts
diff --git a/flexibleengine/acceptance/data_source_flexibleengine_dws_flavors_test.go b/flexibleengine/acceptance/data_source_flexibleengine_dws_flavors_test.go
index 68088c1f..61e6e952 100644
--- a/flexibleengine/acceptance/data_source_flexibleengine_dws_flavors_test.go
+++ b/flexibleengine/acceptance/data_source_flexibleengine_dws_flavors_test.go
@@ -52,6 +52,23 @@ func TestAccDwsFlavorsDataSource_memory(t *testing.T) {
})
}
+func TestAccDwsFlavorsDataSource_dataStoreType(t *testing.T) {
+ resourceName := "data.flexibleengine_dws_flavors.test"
+ resource.ParallelTest(t, resource.TestCase{
+ PreCheck: func() { testAccPreCheck(t) },
+ ProviderFactories: TestAccProviderFactories,
+ Steps: []resource.TestStep{
+ {
+ Config: testAccDwsFlavorsDataSource_dataStoreType,
+ Check: resource.ComposeTestCheckFunc(
+ testAccCheckDwsFlavorDataSourceID(resourceName),
+ resource.TestCheckResourceAttrSet(resourceName, "flavors.#"),
+ ),
+ },
+ },
+ })
+}
+
func TestAccDwsFlavorsDataSource_all(t *testing.T) {
resourceName := "data.flexibleengine_dws_flavors.test"
resource.ParallelTest(t, resource.TestCase{
@@ -125,6 +142,12 @@ data "flexibleengine_dws_flavors" "test" {
memory = 64
}
`
+
+const testAccDwsFlavorsDataSource_dataStoreType = `
+data "flexibleengine_dws_flavors" "test" {
+ datastore_type = "hybrid"
+}`
+
const testAccDwsFlavorsDataSource_all = `
data "flexibleengine_availability_zones" "test" {}