Skip to content

Commit

Permalink
Merge pull request #348 from sbercloud-terraform/release-1.12.6
Browse files Browse the repository at this point in the history
updated rds
  • Loading branch information
0ohmresistor authored Jan 16, 2025
2 parents 7ef1ec1 + fe9fd09 commit 8c7e0cc
Show file tree
Hide file tree
Showing 124 changed files with 7,277 additions and 16,487 deletions.
81 changes: 81 additions & 0 deletions docs/data-sources/cce_cluster_certificate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
subcategory: "Cloud Container Engine (CCE)"
layout: "huaweicloud"
page_title: "HuaweiCloud: huaweicloud_cce_cluster_certificate"
description: ""
---

# sbercloud_cce_cluster_certificate

Use this data source to get the certificate of a CCE cluster within HuaweiCloud.

## Example Usage

```hcl
variable "cluster_id" {}
data "sbercloud_cce_cluster_certificate" "test" {
cluster_id = var.cluster_id
duration = 30
}
```

## Argument Reference

The following arguments are supported:

* `region` - (Optional, String) Specifies the region in which to obtain the CCE cluster certificate. If omitted, the
provider-level region will be used.

* `cluster_id` - (Required, String) Specifies the cluster ID which the cluster certificate in.

* `duration` - (Required, Int) Specifies the duration of the cluster certificate. The unit is days. The valid value in
[1, 1827]. If the input value is -1, it will use the maximum 1827 as `duration` value.

## Attribute Reference

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

* `id` - The data source ID in UUID format.

* `kube_config_raw` - Raw Kubernetes config to be used by kubectl and other compatible tools.

* `current_context` - The current context of the cluster certificate.

* `clusters` - The clusters information of the cluster certificate.
The [clusters](#CCECluster_clusters) structure is documented below.

* `users` - The users information of cluster the certificate.
The [users](#CCECluster_users) structure is documented below.

* `contexts` - The contexts information of the cluster certificate.
The [contexts](#CCECluster_contexts) structure is documented below.

<a name="CCECluster_clusters"></a>
The `clusters` block supports:

* `name` - The cluster name of the cluster certificate.

* `server` - The server address of the cluster certificate.

* `certificate_authority_data` - The certificate authority data of the cluster certificate.

* `insecure_skip_tls_verify` - Whether insecure skip tls verify of the cluster certificate.

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

* `name` - The user name of the cluster certificate. The value is fixed to `user`.

* `client_certificate_data` - The client certificate data of the cluster certificate.

* `client_key_data` - The client key data of the cluster certificate.

<a name="CCECluster_contexts"></a>
The `contexts` block supports:

* `name` - The context name of the cluster certificate.

* `cluster` - The context cluster of the cluster certificate.

* `user` - The context user of the cluster certificate.
92 changes: 92 additions & 0 deletions docs/resources/rds_mysql_account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
subcategory: "Relational Database Service (RDS)"
layout: "sbercloud"
page_title: "SberCloud: sbercloud_rds_mysql_account"
description: ""
---

# sbercloud_rds_mysql_account

Manages RDS Mysql account resource within SberCloud.

## Example Usage

```hcl
variable "instance_id" {}
variable "account_password" {}
resource "sbercloud_rds_mysql_account" "test" {
instance_id = var.instance_id
name = "test"
password = var.account_password
}
```

## Argument Reference

The following arguments are supported:

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

* `instance_id` - (Required, String, ForceNew) Specifies the rds instance id. Changing this will create a new resource.

* `name` - (Required, String, ForceNew) Specifies the username of the db account. Only lowercase letters, digits,
hyphens (-), and underscores (_) are allowed. Changing this will create a new resource.
+ If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
+ If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.

* `password` - (Required, String) Specifies the password of the db account. The parameter must be 8 to 32 characters
long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be
different from `name` or `name` spelled backwards.

* `hosts` - (Optional, List, ForceNew) Specifies the IP addresses that are allowed to access your DB instance.
+ If the IP address is set to %, all IP addresses are allowed to access your instance.
+ If the IP address is set to 10.10.10.%, all IP addresses in the subnet 10.10.10.X are allowed to access
your instance.
+ Multiple IP addresses can be added.

Changing this parameter will create a new resource.

* `description` - (Optional, String) Specifies remarks of the database account. The parameter must be 1 to 512
characters long and is supported only for MySQL 8.0.25 and later versions.

## Attribute Reference

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

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

## Timeouts

This resource provides the following timeouts configuration options:

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

## Import

RDS account can be imported using the `instance_id` and `name` separated by a slash, e.g.:

```bash
$ terraform import sbercloud_rds_mysql_account.account_1 <instance_id>/<name>
```

Note that the imported state may not be identical to your resource definition, due to some attributes missing from the
API response, security or some other reason. The missing attributes include: `password`. It is generally recommended
running `terraform plan` after importing the RDS Mysql account. You can then decide if changes should be applied to
the RDS Mysql account, or the resource definition should be updated to align with the RDS Mysql account. Also you
can ignore changes as below.

```hcl
resource "sbercloud_rds_mysql_account" "account_1" {
...
lifecycle {
ignore_changes = [
password
]
}
}
```
46 changes: 46 additions & 0 deletions docs/resources/rds_mysql_binlog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
subcategory: "Relational Database Service (RDS)"
layout: "sbercloud"
page_title: "SberCloud: sbercloud_rds_mysql_binlog"
description: ""
---

# sbercloud_rds_mysql_binlog

Manages RDS MySQL binlog resource within SberCloud.

## Example Usage

```hcl
variable "instance_id" {}
resource "sbercloud_rds_mysql_binlog" "test" {
instance_id = var.instance_id
binlog_retention_hours = 6
}
```

## Argument Reference

The following arguments are supported:

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

* `instance_id` - (Required, String, ForceNew) Specifies the RDS MySQL instance ID. Changing this will create a new resource.

* `binlog_retention_hours` - (Required, Int) Specifies the binlog retention period. Value range: `1` to `168` (7x24).

## Attribute Reference

In addition to all arguments above, the following attribute is exported:

* `id` - The resource ID .

## Import

RDS MySQL binlog can be imported using the `instance id`, e.g.

```bash
$ terraform import sbercloud_rds_mysql_binlog.test <instance_id>
```
66 changes: 66 additions & 0 deletions docs/resources/rds_mysql_database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
subcategory: "Relational Database Service (RDS)"
layout: "sbercloud"
page_title: "SberCloud: sbercloud_rds_mysql_database"
description: ""
---

# sbercloud_rds_mysql_database

Manages RDS Mysql database resource within SberCloud.

## Example Usage

```hcl
variable "instance_id" {}
resource "sbercloud_rds_mysql_database" "test" {
instance_id = var.instance_id
name = "test"
character_set = "utf8"
description = "test database"
}
```

## Argument Reference

The following arguments are supported:

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

* `instance_id` - (Required, String, ForceNew) Specifies the RDS instance ID. Changing this will create a new resource.

* `name` - (Required, String, ForceNew) Specifies the database name. The database name contains `1` to `64`
characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs
($). The total number of hyphens (-) and dollar signs ($) cannot exceed `10`. RDS for **MySQL 8.0** does not
support dollar signs ($). Changing this will create a new resource.

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

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

## Timeouts

This resource provides the following timeouts configuration options:

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

## Import

RDS database can be imported using the `instance id` and `name` separated by slash, e.g.

```bash
$ terraform import sbercloud_rds_mysql_database.database_1 <instance_id>/<name>
```
79 changes: 79 additions & 0 deletions docs/resources/rds_mysql_database_privilege.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
subcategory: "Relational Database Service (RDS)"
layout: "sbercloud"
page_title: "SberCloud: sbercloud_rds_mysql_database_privilege"
description: ""
---

# sbercloud_rds_mysql_database_privilege

Manages RDS Mysql database privilege resource within SberCloud.

## Example Usage

```hcl
variable "instance_id" {}
variable "db_name" {}
variable "user_name_1" {}
variable "user_name_2" {}
resource "sbercloud_rds_mysql_database_privilege" "test" {
instance_id = var.instance_id
db_name = var.db_name
users {
name = var.user_name_1
readonly = true
}
users {
name = var.user_name_2
readonly = false
}
}
```

## Argument Reference

The following arguments are supported:

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

* `instance_id` - (Required, String, ForceNew) Specifies the RDS instance ID. Changing this will create a new resource.

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

* `users` - (Required, List) Specifies the account that associated with the database. Structure is documented below.

The `users` block supports:

* `name` - (Required, String) Specifies the username of the database account.

* `readonly` - (Optional, Bool) 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**.

## 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>/<db_name>`.

## Timeouts

This resource provides the following timeouts configuration options:

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

## Import

RDS database privilege can be imported using the `instance id` and `db_name`, e.g.

```bash
$ terraform import sbercloud_rds_mysql_database_privilege.test <instance_id>/<db_name>
```
Loading

0 comments on commit 8c7e0cc

Please sign in to comment.