Skip to content

Commit

Permalink
docs(rds): fix docs issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zippo-Wang committed Oct 8, 2023
1 parent f653c6b commit 969ec95
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 19 deletions.
10 changes: 9 additions & 1 deletion docs/resources/rds_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,20 @@ The following arguments are supported:
long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be
different from name or name spelled backwards.

## Attributes Reference
## Attribute Reference

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

* `id` - The resource ID of account which is formatted `<instance_id>/<account_name>`.

## Timeouts

This resource provides the following timeouts configuration options:

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

## Import

RDS account can be imported using the `instance id` and `account name`, e.g.:
Expand Down
14 changes: 13 additions & 1 deletion docs/resources/rds_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,24 @@ The following arguments are supported:
* `character_set` - (Required, String, ForceNew) Specifies the character set used by the database, For example **utf8**,
**gbk**, **ascii**, etc. Changing this will create a new resource.

## Attributes Reference
* `description` - (Optional, String) Specifies the database description. The value can contain **0** to **512**
characters. This parameter takes effect only for DB instances whose kernel versions are at least **5.6.51.3**,
**5.7.33.1**, or **8.0.21.4**.

## Attribute Reference

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

* `id` - The resource ID of database which is formatted `<instance_id>/<database_name>`.

## Timeouts

This resource provides the following timeouts configuration options:

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

## Import

RDS database can be imported using the `instance id` and `database name`, e.g.
Expand Down
17 changes: 13 additions & 4 deletions docs/resources/rds_database_privilege.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,34 @@ The following arguments are supported:

* `db_name` - (Required, String, ForceNew) Specifies the database name. Changing this creates a new resource.

* `users` - (Required, String, ForceNew) Specifies the account that associated with the database. This parameter supports
a maximum of 50 elements. Structure is documented below. Changing this creates a new resource.
* `users` - (Required, List, ForceNew) Specifies the account that associated with the database. This parameter supports
a maximum of 50 elements. The [users](#rds_users) object structure is documented below.
Changing this creates a new resource.

<a name="rds_users"></a>
The `users` block supports:

* `name` - (Required, String, ForceNew) Specifies the username of the database account. Changing this creates a new resource.
* `name` - (Required, String, ForceNew) Specifies the username of the database account. Changing this creates anew resource.

* `readonly` - (Optional, Bool, ForceNew) Specifies the read-only permission. The value can be:
+ **true**: indicates the read-only permission.
+ **false**: indicates the read and write permission.

The default value is **false**. Changing this creates a new resource.

## Attributes Reference
## Attribute Reference

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

* `id` - The resource ID of database privilege which is formatted `<instance_id>/<database_name>`.

## Timeouts

This resource provides the following timeouts configuration options:

* `create` - Default is 10 minutes.
* `delete` - Default is 10 minutes.

## Import

RDS database privilege can be imported using the `instance id` and `database name`, e.g.
Expand Down
37 changes: 25 additions & 12 deletions docs/resources/rds_instance_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ resource "flexibleengine_rds_instance_v3" "instance" {

The following arguments are supported:

* `region` - (Optional, String, ForceNew) Specifies the region in which to create the RDS instance resource.
If omitted, the provider-level region will be used. Changing this will create a new RDS instance resource.

* `name` - (Required, String) Specifies the DB instance name. The DB instance name of the same type must be unique for
the same tenant. The value must be 4 to 64 characters in length and start with a letter. It is case-sensitive and can
contain only letters, digits, hyphens (-), and underscores (_).
Expand All @@ -167,8 +170,8 @@ The following arguments are supported:
* `availability_zone` - (Required, List, ForceNew) Specifies the list of AZ name.
Changing this parameter will create a new resource.

* `db` - (Required, String, ForceNew) Specifies the database information. Structure is documented below.
Changing this parameter will create a new resource.
* `db` - (Required, String, ForceNew) Specifies the database information. The [db](#rds_db) object structure is
documented below. Changing this parameter will create a new resource.

* `vpc_id` - (Required, String, ForceNew) Specifies the VPC ID. Changing this parameter will create a new resource.

Expand All @@ -177,12 +180,14 @@ The following arguments are supported:

* `security_group_id` - (Required, String) Specifies the security group which the RDS DB instance belongs to.

* `volume` - (Required, List) Specifies the volume information. Structure is documented below.
* `volume` - (Required, List) Specifies the volume information. The [volume](#rds_volume) object structure is
documented below.

* `fixed_ip` - (Optional, String, ForceNew) Specifies an intranet IP address of RDS DB instance.
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](#rds_backup_strategy)
object structure is documented below.

* `ha_replication_mode` - (Optional, String, ForceNew) Specifies the replication mode for the standby DB instance.
Changing this parameter will create a new resource.
Expand All @@ -204,6 +209,7 @@ The following arguments are supported:
* `tags` - (Optional, Map) A mapping of tags to assign to the RDS instance.
Each tag is represented by one key-value pair.

<a name="rds_db"></a>
The `db` block supports:

* `type` - (Required, String, ForceNew) Specifies the DB engine. Available value are *MySQL*, *PostgreSQL* and
Expand All @@ -229,6 +235,7 @@ The `db` block supports:
+ The Microsoft SQL Server database port can be 1433 or ranges from 2100 to 9500, excluding 5355 and 5985.
The default value is 1433.

<a name="rds_volume"></a>
The `volume` block supports:

* `size` - (Required, Int) Specifies the volume size. Its value range is from 40 GB to 4000 GB.
Expand All @@ -244,6 +251,7 @@ The `volume` block supports:
* `disk_encryption_id` - (Optional, String) Specifies the key ID for disk encryption.
Changing this parameter will create a new resource.

<a name="rds_backup_strategy"></a>
The `backup_strategy` block supports:

* `keep_days` - (Optional, Int) Specifies the retention days for specific backup files. The value range is from 0 to
Expand All @@ -258,7 +266,7 @@ The `backup_strategy` block supports:
MM must be the same and must be set to any of the following: 00, 15, 30, or 45. Example value: 08:15-09:15 23:00-00:
00.

## Attributes Reference
## Attribute Reference

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

Expand All @@ -268,18 +276,17 @@ In addition to the arguments listed above, the following computed attributes are

* `created` - Indicates the creation time.

* `nodes` - Indicates the instance nodes information. Structure is documented below.
* `nodes` - Indicates the instance nodes information. The [nodes](#rds_attr_nodes) object structure is documented below.

* `private_ips` - Indicates the private IP address list.
It is a blank string until an ECS is created.

* `public_ips` - Indicates the public IP address list.

* `db` - See Argument Reference above. The `db` block also contains:

+ `user_name` - Indicates the default user name of database.
* `db` - See Argument Reference above. The [db](#rds_attr_db) object structure is documented below.

The `nodes` block contains:
<a name="rds_attr_nodes"></a>
The `nodes` block supports:

* `availability_zone` - Indicates the AZ.

Expand All @@ -292,12 +299,18 @@ The `nodes` block contains:

* `status` - Indicates the node status.

<a name="rds_attr_db"></a>
The `db` block supports:

* `user_name` - Indicates the default username of database.

## Timeouts

This resource provides the following timeouts configuration options:

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

## Import

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ resource "flexibleengine_networking_secgroup_v2" "test" {
resource "flexibleengine_rds_instance_v3" "test" {
name = "%[1]s"
flavor = "rds.mysql.s3.large.2.ha"
flavor = "rds.mysql.c6.large.2.ha"
security_group_id = flexibleengine_networking_secgroup_v2.test.id
subnet_id = flexibleengine_vpc_subnet_v1.test.id
vpc_id = flexibleengine_vpc_v1.test.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "flexibleengine_rds_database" "test" {
instance_id = flexibleengine_rds_instance_v3.test.id
name = "%s"
character_set = "utf8"
description = "terraform script description"
}
`, testRdsAccount_base(rName), rName)
}

0 comments on commit 969ec95

Please sign in to comment.