Skip to content

Commit

Permalink
add changelog and update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lyu571 committed May 22, 2023
1 parent 48305f0 commit 4710c16
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changelog/1803.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:new-data-source
tencentcloud_postgresql_base_backups
```

```release-note:new-resource
tencentcloud_postgresql_base_backup
```
1 change: 0 additions & 1 deletion tencentcloud/service_tencentcloud_postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,6 @@ func (me *PostgresqlService) DescribeDBEncryptionKeys(ctx context.Context, reque
return
}

func (me *PostgresqlService) DescribePostgresqlReadonlyGroups(ctx context.Context, filter []*postgresql.Filter) (instanceList []*postgresql.ReadOnlyGroup, errRet error) {
func (me *PostgresqlService) DescribePostgresqlReadonlyGroups(ctx context.Context, filter []*postgresql.Filter) (instanceList []*postgresql.ReadOnlyGroup, errRet error) {
logId := getLogId(ctx)
request := postgresql.NewDescribeReadOnlyGroupsRequest()
Expand Down
69 changes: 69 additions & 0 deletions website/docs/d/postgresql_base_backups.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
subcategory: "TencentDB for PostgreSQL(PostgreSQL)"
layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_postgresql_base_backups"
sidebar_current: "docs-tencentcloud-datasource-postgresql_base_backups"
description: |-
Use this data source to query detailed information of postgresql base_backups
---

# tencentcloud_postgresql_base_backups

Use this data source to query detailed information of postgresql base_backups

## Example Usage

```hcl
data "tencentcloud_postgresql_base_backups" "base_backups" {
min_finish_time = "%s"
max_finish_time = "%s"
order_by = "StartTime"
order_by_type = "asc"
}
data "tencentcloud_postgresql_base_backups" "base_backups" {
filters {
name = "db-instance-id"
values = [local.pgsql_id]
}
order_by = "Size"
order_by_type = "asc"
}
```

## Argument Reference

The following arguments are supported:

* `filters` - (Optional, List) Filter instances using one or more criteria. Valid filter names:db-instance-id: Filter by instance ID (in string format).db-instance-name: Filter by instance name (in string format).db-instance-ip: Filter by instance VPC IP (in string format).
* `max_finish_time` - (Optional, String) Maximum end time of a backup in the format of `2018-01-01 00:00:00`. It is the current time by default.
* `min_finish_time` - (Optional, String) Minimum end time of a backup in the format of `2018-01-01 00:00:00`. It is 7 days ago by default.
* `order_by_type` - (Optional, String) Sorting order. Valid values: `asc` (ascending), `desc` (descending).
* `order_by` - (Optional, String) Sorting field. Valid values: `StartTime`, `FinishTime`, `Size`.
* `result_output_file` - (Optional, String) Used to save results.
* `tags` - (Optional, Map) Tag description list.

The `filters` object supports the following:

* `name` - (Optional, String) Filter name.
* `values` - (Optional, Set) One or more filter values.

## Attributes Reference

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

* `base_backup_set` - List of full backup details.
* `backup_method` - Backup method, including physical and logical.
* `backup_mode` - Backup mode, including automatic and manual.
* `db_instance_id` - Instance ID.
* `expire_time` - Backup expiration time.
* `finish_time` - Backup end time.
* `id` - Unique ID of a backup file.
* `name` - Backup file name.
* `size` - Backup set size in bytes.
* `start_time` - Backup start time.
* `state` - Backup task status.


41 changes: 41 additions & 0 deletions website/docs/r/postgresql_base_backup.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
subcategory: "TencentDB for PostgreSQL(PostgreSQL)"
layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_postgresql_base_backup"
sidebar_current: "docs-tencentcloud-resource-postgresql_base_backup"
description: |-
Provides a resource to create a postgresql base_backup
---

# tencentcloud_postgresql_base_backup

Provides a resource to create a postgresql base_backup

## Example Usage

```hcl
resource "tencentcloud_postgresql_base_backup" "base_backup" {
db_instance_id = ""
new_expire_time = ""
tags = {
"createdBy" = "terraform"
}
}
```

## Argument Reference

The following arguments are supported:

* `db_instance_id` - (Required, String) Instance ID.
* `new_expire_time` - (Optional, String) New expiration time.
* `tags` - (Optional, Map) Tag description list.

## Attributes Reference

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

* `id` - ID of the resource.
* `base_backup_id` - Base backup ID.


6 changes: 6 additions & 0 deletions website/tencentcloud.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3221,6 +3221,9 @@
<li>
<a href="#">Data Sources</a>
<ul class="nav nav-auto-expand">
<li>
<a href="/docs/providers/tencentcloud/d/postgresql_base_backups.html">tencentcloud_postgresql_base_backups</a>
</li>
<li>
<a href="/docs/providers/tencentcloud/d/postgresql_instances.html">tencentcloud_postgresql_instances</a>
</li>
Expand All @@ -3244,6 +3247,9 @@
<li>
<a href="/docs/providers/tencentcloud/r/postgresql_backup_plan_config.html">tencentcloud_postgresql_backup_plan_config</a>
</li>
<li>
<a href="/docs/providers/tencentcloud/r/postgresql_base_backup.html">tencentcloud_postgresql_base_backup</a>
</li>
<li>
<a href="/docs/providers/tencentcloud/r/postgresql_instance.html">tencentcloud_postgresql_instance</a>
</li>
Expand Down

0 comments on commit 4710c16

Please sign in to comment.