Skip to content

Commit

Permalink
Merge pull request #230 from Ccaswell42/develop
Browse files Browse the repository at this point in the history
Added NEW resources
  • Loading branch information
Ccaswell42 authored Sep 15, 2023
2 parents 9ba6197 + 7fa6ce5 commit f6b4ee9
Show file tree
Hide file tree
Showing 23 changed files with 949 additions and 112 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 1.11.5 (September 15, 2023)

FEATURES:

* **New Data Source:** `sbercloud_rds_backups` ([#229](https://github.com/sbercloud-terraform/terraform-provider-sbercloud/issues/229))
* **New Data Source:** `sbercloud_rds_instances` ([#229](https://github.com/sbercloud-terraform/terraform-provider-sbercloud/issues/229))
* **New Data Source:** `sbercloud_sfs_turbos` ([#229](https://github.com/sbercloud-terraform/terraform-provider-sbercloud/issues/229))
* **New Resource:** `sbercloud_rds_backup` ([#229](https://github.com/sbercloud-terraform/terraform-provider-sbercloud/issues/229))

ENHANCEMENTS:

* resource/sbercloud_dli_spark_job: add `version`, `app_parameters`, `feature` params ([#222](https://github.com/sbercloud-terraform/terraform-provider-sbercloud/issues/222))

## 1.11.4 (August 1, 2023)

FEATURES:
Expand Down
100 changes: 100 additions & 0 deletions docs/data-sources/rds_backups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
subcategory: "Relational Database Service (RDS)"
---

# sbercloud_rds_backups

Use this data source to get the list of RDS backups.

## Example Usage

```hcl
variable "instance_id" {}
data "sbercloud_rds_backups" "test" {
instance_id = var.instance_id
}
```

## Argument Reference

The following arguments are supported:

* `region` - (Optional, String) Specifies the region in which to query the data source.
If omitted, the provider-level region will be used.

* `instance_id` - (Required, String) Instance ID.

* `backup_id` - (Optional, String) Backup ID.

* `backup_type` - (Optional, String) Backup type.
The options are as follows:
- **auto**: Automated full backup.
- **manual**: Manual full backup.
- **fragment**: Differential full backup.
- **incremental**: Automated incremental backup.

* `begin_time` - (Optional, String) Start time in the "yyyy-mm-ddThh:mm:ssZ" format.

* `end_time` - (Optional, String) End time in the "yyyy-mm-ddThh:mm:ssZ" format.

* `name` - (Optional, String) Backup name.

## Attribute Reference

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

* `id` - The resource ID.

* `backups` - Backup list. For details, see Data structure of the Backup field.
The [backups](#Backup_Backup) structure is documented below.

<a name="Backup_Backup"></a>
The `backups` block supports:

* `id` - Backup ID.

* `instance_id` - RDS instance ID.

* `name` - Backup name.

* `type` - Backup type.
The options are as follows:
- **auto**: Automated full backup.
- **manual**: Manual full backup.
- **fragment**: Differential full backup.
- **incremental**: Automated incremental backup.

* `size` - Backup size in KB.

* `status` - Backup status.
The options are as follows:
- **BUILDING**: Backup in progress.
- **COMPLETED**: Backup completed.
- **FAILED**: Backup failed.
- **DELETING**: Backup being deleted.

* `begin_time` - Backup start time in the "yyyy-mm-ddThh:mm:ssZ" format.

* `end_time` - Backup end time in the "yyyy-mm-ddThh:mm:ssZ" format.

* `associated_with_ddm` - Whether a DDM instance has been associated.

* `datastore` - The database information.
The [datastore](#Backup_BackupDatastore) structure is documented below.

* `databases` - Database been backed up.
The [databases](#Backup_BackupDatabases) structure is documented below.

<a name="Backup_BackupDatastore"></a>
The `datastore` block supports:

* `type` - DB engine.
The value can be: **MySQL**, **PostgreSQL**, **SQLServer**.

* `version` - DB engine version.

<a name="Backup_BackupDatabases"></a>
The `databases` block supports:

* `name` - Database to be backed up for Microsoft SQL Server.
114 changes: 114 additions & 0 deletions docs/data-sources/rds_instances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
subcategory: "Relational Database Service (RDS)"
---

# sbercloud_rds_instances

Use this data source to list all available RDS instances.

## Example Usage

```hcl
data "sbercloud_rds_instances" "this" {
name = "rds-instance"
}
```

## Argument Reference

* `region` - (Optional, String) The region in which to obtain the instances. If omitted, the provider-level region will
be used.

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

* `type` - (Optional, String) Specifies the type of the instance. Valid values are: Single, Ha, Replica, and Enterprise.

* `datastore_type` - (Optional, String) Specifies the type of the database. Valid values are: MySQL, PostgreSQL, and SQLServer.

* `vpc_id` - (Optional, String) Specifies the VPC ID.

* `subnet_id` - (Optional, String) Specifies the network ID of a subnet.

* `enterprise_project_id` - (Optional, String) Specifies the enterprise project id.

## Attribute Reference

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

* `id` - The ID of the data source.

* `instances` - An array of available instances.

The `instances` block supports:

* `region` - The region of the instance.

* `name` - Indicates the name of the instance.

* `availability_zone` - Indicates the availability zone name.

* `flavor` - Indicates the instance specifications.

* `vpc_id` - Indicates the VPC ID.

* `subnet_id` - Indicates the network ID of a subnet.

* `id` - Indicates the ID of the instance.

* `security_group_id` - Indicates the security group ID.

* `param_group_id` - Indicates the configuration ID.

* `enterprise_project_id` - Indicates the enterprise project id.

* `fixed_ip` - Indicates the intranet floating IP address of the instance.

* `ssl_enable` - Indicates whether to enable SSL.

* `tags` - Indicates the tags of the instance.

* `ha_replication_mode` - Indicates the replication mode for the standby DB instance.

* `time_zone` - Indicates the time zone.

* `private_ips` - Indicates the private ips in list.

* `public_ips` - Indicates the public ips in list.

* `status` - Indicates the DB instance status.

* `created` - Indicates the creation time.

* `db` - Indicates the database information. Structure is documented below.

* `volume` - Indicates the volume information. Structure is documented below.

* `backup_strategy` - Indicates the advanced backup policy. Structure is documented below.

* `nodes` - Indicates the instance nodes information. Structure is documented below.

The `db` block contains:

* `type` - Indicates the database engine.
* `version` - Indicates the database version.
* `port` - Indicates the database port.
* `user_name` - Indicates the database user name.

The `volume` block contains:

* `size` - Indicates the volume size.
* `type` - Indicates the volume type.
* `disk_encryption_id` - Indicates the kms key id.

The `backup_strategy` block contains:

* `start_time` - Indicates the backup time window.
* `keep_days` - Indicates the number of days to retain the generated.

The `nodes` block contains:

* `id` - Indicates the node ID.
* `name` - Indicates the node name.
* `status` - Indicates the node status.
* `role` - Indicates the node type.
* `availability_zone` - Indicates the availability zone where the node resides.
77 changes: 77 additions & 0 deletions docs/data-sources/sfs_turbos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
subcategory: "Scalable File Service (SFS)"
---

# sbercloud_sfs_turbos

Use this data source to get the list of the available SFS turbos.

## Example Usage

```hcl
variable "sfs_turbo_name" {}
data "sbercloud_sfs_turbos" "test" {
name = var.sfs_turbo_name
}
```

## Argument Reference

The following arguments are supported:

* `region` - (Optional, String) Specifies the region in which to obtain the SFS turbo file systems.
If omitted, the provider-level region will be used.

* `name` - (Optional, String) Specifies the name of the SFS turbo file system.

* `size` - (Optional, Int) Specifies the capacity of the SFS turbo file system, in GB.
The value ranges from `500` to `32,768`, and must be large than `10,240` for an enhanced file system.

* `share_proto` - (Optional, String) Specifies the protocol of the SFS turbo file system. The valid value is **NFS**.

* `share_type` - (Optional, String) Specifies the type of the SFS turbo file system.
The valid values are **STANDARD** and **PERFORMANCE**.

* `enterprise_project_id` - (Optional, String) The enterprise project ID of the SFS turbo file system.

## Attribute Reference

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

* `id` - The data source ID.

* `turbos` - The list of the SFS turbo file systems. The [object](#turbo) structure is documented below.

<a name="turbo"></a>
The `turbos` block supports:

* `id` - The resource ID of the SFS turbo file system.

* `name` - The name of the SFS turbo file system.

* `size` - The capacity of the SFS turbo file system.

* `share_proto` - The protocol of the SFS turbo file system.

* `share_type` - The type of the SFS turbo file system.

* `enterprise_project_id` - The enterprise project ID of the SFS turbo file system.

* `version` - The version of the SFS turbo file system.

* `enhanced` - Whether the SFS turbo file system is enhanced.

* `availability_zone` - The availability zone where the SFS turbo file system is located.

* `available_capacity` - The available capacity of the SFS turbo file system, in GB.

* `export_location` - The mount point of the SFS turbo file system.

* `crypt_key_id` - The ID of a KMS key to encrypt the SFS turbo file system.

* `vpc_id` - The ID of the VPC to which the SFS turbo belongs.

* `subnet_id` - The **network ID** of the subnet to which the SFS turbo belongs.

* `security_group_id` - The ID of the security group to which the SFS turbo belongs.
21 changes: 2 additions & 19 deletions docs/resources/cce_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ resource "sbercloud_vpc_subnet" "eni_test" {
name = "subnet-eni"
cidr = "192.168.2.0/24"
gateway_ip = "192.168.2.1"
vpc_id = sbercloud_vpc.test.id
vpc_id = sbercloud_vpc.myvpc.id
}
resource "sbercloud_cce_cluster" "test" {
name = cluster"
name = "cluster"
flavor_id = "cce.s1.small"
vpc_id = sbercloud_vpc.myvpc.id
subnet_id = sbercloud_vpc_subnet.mysubnet.id
Expand Down Expand Up @@ -205,23 +205,6 @@ The following arguments are supported:
* `extend_param` - (Optional, Map, ForceNew) Specifies the extended parameter.
Changing this parameter will create a new cluster resource.

* `charging_mode` - (Optional, String, ForceNew) Specifies the charging mode of the CCE cluster.
Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
Changing this parameter will create a new cluster resource.

* `period_unit` - (Optional, String, ForceNew) Specifies the charging period unit of the CCE cluster.
Valid values are **month** and **year**. This parameter is mandatory if `charging_mode` is set to **prePaid**.
Changing this parameter will create a new cluster resource.

* `period` - (Optional, Int, ForceNew) Specifies the charging period of the CCE cluster.
If `period_unit` is set to **month**, the value ranges from 1 to 9.
If `period_unit` is set to **year**, the value ranges from 1 to 3.
This parameter is mandatory if `charging_mode` is set to **prePaid**.
Changing this parameter will create a new cluster resource.

* `auto_renew` - (Optional, String, ForceNew) Specifies whether auto renew is enabled. Valid values are **true** and
**false**. Changing this parameter will create a new cluster resource.

* `enterprise_project_id` - (Optional, String, ForceNew) The enterprise project ID of the CCE cluster.
Changing this parameter will create a new cluster resource.

Expand Down
Loading

0 comments on commit f6b4ee9

Please sign in to comment.