published on Monday, May 11, 2026 by tencentcloudstack
published on Monday, May 11, 2026 by tencentcloudstack
Provides a resource to create a PostgreSQL base backup
Example Usage
Create a PostgreSQL base backup
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.PostgresqlBaseBackup("example", {
dbInstanceId: "postgres-ckwcgdf1",
tags: {
createdBy: "Terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.PostgresqlBaseBackup("example",
db_instance_id="postgres-ckwcgdf1",
tags={
"createdBy": "Terraform",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewPostgresqlBaseBackup(ctx, "example", &tencentcloud.PostgresqlBaseBackupArgs{
DbInstanceId: pulumi.String("postgres-ckwcgdf1"),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("Terraform"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.PostgresqlBaseBackup("example", new()
{
DbInstanceId = "postgres-ckwcgdf1",
Tags =
{
{ "createdBy", "Terraform" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlBaseBackup;
import com.pulumi.tencentcloud.PostgresqlBaseBackupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new PostgresqlBaseBackup("example", PostgresqlBaseBackupArgs.builder()
.dbInstanceId("postgres-ckwcgdf1")
.tags(Map.of("createdBy", "Terraform"))
.build());
}
}
resources:
example:
type: tencentcloud:PostgresqlBaseBackup
properties:
dbInstanceId: postgres-ckwcgdf1
tags:
createdBy: Terraform
Example coming soon!
Customize the expire time
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.PostgresqlBaseBackup("example", {
dbInstanceId: "postgres-ckwcgdf1",
newExpireTime: "2027-04-23 20:07:36",
tags: {
createdBy: "Terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.PostgresqlBaseBackup("example",
db_instance_id="postgres-ckwcgdf1",
new_expire_time="2027-04-23 20:07:36",
tags={
"createdBy": "Terraform",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewPostgresqlBaseBackup(ctx, "example", &tencentcloud.PostgresqlBaseBackupArgs{
DbInstanceId: pulumi.String("postgres-ckwcgdf1"),
NewExpireTime: pulumi.String("2027-04-23 20:07:36"),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("Terraform"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.PostgresqlBaseBackup("example", new()
{
DbInstanceId = "postgres-ckwcgdf1",
NewExpireTime = "2027-04-23 20:07:36",
Tags =
{
{ "createdBy", "Terraform" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlBaseBackup;
import com.pulumi.tencentcloud.PostgresqlBaseBackupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new PostgresqlBaseBackup("example", PostgresqlBaseBackupArgs.builder()
.dbInstanceId("postgres-ckwcgdf1")
.newExpireTime("2027-04-23 20:07:36")
.tags(Map.of("createdBy", "Terraform"))
.build());
}
}
resources:
example:
type: tencentcloud:PostgresqlBaseBackup
properties:
dbInstanceId: postgres-ckwcgdf1
newExpireTime: 2027-04-23 20:07:36
tags:
createdBy: Terraform
Example coming soon!
Create PostgresqlBaseBackup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresqlBaseBackup(name: string, args: PostgresqlBaseBackupArgs, opts?: CustomResourceOptions);@overload
def PostgresqlBaseBackup(resource_name: str,
args: PostgresqlBaseBackupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresqlBaseBackup(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_instance_id: Optional[str] = None,
new_expire_time: Optional[str] = None,
postgresql_base_backup_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[PostgresqlBaseBackupTimeoutsArgs] = None)func NewPostgresqlBaseBackup(ctx *Context, name string, args PostgresqlBaseBackupArgs, opts ...ResourceOption) (*PostgresqlBaseBackup, error)public PostgresqlBaseBackup(string name, PostgresqlBaseBackupArgs args, CustomResourceOptions? opts = null)
public PostgresqlBaseBackup(String name, PostgresqlBaseBackupArgs args)
public PostgresqlBaseBackup(String name, PostgresqlBaseBackupArgs args, CustomResourceOptions options)
type: tencentcloud:PostgresqlBaseBackup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_postgresqlbasebackup" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args PostgresqlBaseBackupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PostgresqlBaseBackupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PostgresqlBaseBackupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresqlBaseBackupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresqlBaseBackupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PostgresqlBaseBackup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PostgresqlBaseBackup resource accepts the following input properties:
- Db
Instance stringId - Instance ID.
- New
Expire stringTime - New expiration time.
- Postgresql
Base stringBackup Id - ID of the resource.
- Dictionary<string, string>
- Tag description list.
- Timeouts
Postgresql
Base Backup Timeouts
- Db
Instance stringId - Instance ID.
- New
Expire stringTime - New expiration time.
- Postgresql
Base stringBackup Id - ID of the resource.
- map[string]string
- Tag description list.
- Timeouts
Postgresql
Base Backup Timeouts Args
- db_
instance_ stringid - Instance ID.
- new_
expire_ stringtime - New expiration time.
- postgresql_
base_ stringbackup_ id - ID of the resource.
- map(string)
- Tag description list.
- timeouts object
- db
Instance StringId - Instance ID.
- new
Expire StringTime - New expiration time.
- postgresql
Base StringBackup Id - ID of the resource.
- Map<String,String>
- Tag description list.
- timeouts
Postgresql
Base Backup Timeouts
- db
Instance stringId - Instance ID.
- new
Expire stringTime - New expiration time.
- postgresql
Base stringBackup Id - ID of the resource.
- {[key: string]: string}
- Tag description list.
- timeouts
Postgresql
Base Backup Timeouts
- db_
instance_ strid - Instance ID.
- new_
expire_ strtime - New expiration time.
- postgresql_
base_ strbackup_ id - ID of the resource.
- Mapping[str, str]
- Tag description list.
- timeouts
Postgresql
Base Backup Timeouts Args
- db
Instance StringId - Instance ID.
- new
Expire StringTime - New expiration time.
- postgresql
Base StringBackup Id - ID of the resource.
- Map<String>
- Tag description list.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresqlBaseBackup resource produces the following output properties:
- Base
Backup stringId - Base backup ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Base
Backup stringId - Base backup ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- base_
backup_ stringid - Base backup ID.
- id string
- The provider-assigned unique ID for this managed resource.
- base
Backup StringId - Base backup ID.
- id String
- The provider-assigned unique ID for this managed resource.
- base
Backup stringId - Base backup ID.
- id string
- The provider-assigned unique ID for this managed resource.
- base_
backup_ strid - Base backup ID.
- id str
- The provider-assigned unique ID for this managed resource.
- base
Backup StringId - Base backup ID.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PostgresqlBaseBackup Resource
Get an existing PostgresqlBaseBackup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PostgresqlBaseBackupState, opts?: CustomResourceOptions): PostgresqlBaseBackup@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
base_backup_id: Optional[str] = None,
db_instance_id: Optional[str] = None,
new_expire_time: Optional[str] = None,
postgresql_base_backup_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[PostgresqlBaseBackupTimeoutsArgs] = None) -> PostgresqlBaseBackupfunc GetPostgresqlBaseBackup(ctx *Context, name string, id IDInput, state *PostgresqlBaseBackupState, opts ...ResourceOption) (*PostgresqlBaseBackup, error)public static PostgresqlBaseBackup Get(string name, Input<string> id, PostgresqlBaseBackupState? state, CustomResourceOptions? opts = null)public static PostgresqlBaseBackup get(String name, Output<String> id, PostgresqlBaseBackupState state, CustomResourceOptions options)resources: _: type: tencentcloud:PostgresqlBaseBackup get: id: ${id}import {
to = tencentcloud_postgresqlbasebackup.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Base
Backup stringId - Base backup ID.
- Db
Instance stringId - Instance ID.
- New
Expire stringTime - New expiration time.
- Postgresql
Base stringBackup Id - ID of the resource.
- Dictionary<string, string>
- Tag description list.
- Timeouts
Postgresql
Base Backup Timeouts
- Base
Backup stringId - Base backup ID.
- Db
Instance stringId - Instance ID.
- New
Expire stringTime - New expiration time.
- Postgresql
Base stringBackup Id - ID of the resource.
- map[string]string
- Tag description list.
- Timeouts
Postgresql
Base Backup Timeouts Args
- base_
backup_ stringid - Base backup ID.
- db_
instance_ stringid - Instance ID.
- new_
expire_ stringtime - New expiration time.
- postgresql_
base_ stringbackup_ id - ID of the resource.
- map(string)
- Tag description list.
- timeouts object
- base
Backup StringId - Base backup ID.
- db
Instance StringId - Instance ID.
- new
Expire StringTime - New expiration time.
- postgresql
Base StringBackup Id - ID of the resource.
- Map<String,String>
- Tag description list.
- timeouts
Postgresql
Base Backup Timeouts
- base
Backup stringId - Base backup ID.
- db
Instance stringId - Instance ID.
- new
Expire stringTime - New expiration time.
- postgresql
Base stringBackup Id - ID of the resource.
- {[key: string]: string}
- Tag description list.
- timeouts
Postgresql
Base Backup Timeouts
- base_
backup_ strid - Base backup ID.
- db_
instance_ strid - Instance ID.
- new_
expire_ strtime - New expiration time.
- postgresql_
base_ strbackup_ id - ID of the resource.
- Mapping[str, str]
- Tag description list.
- timeouts
Postgresql
Base Backup Timeouts Args
- base
Backup StringId - Base backup ID.
- db
Instance StringId - Instance ID.
- new
Expire StringTime - New expiration time.
- postgresql
Base StringBackup Id - ID of the resource.
- Map<String>
- Tag description list.
- timeouts Property Map
Supporting Types
PostgresqlBaseBackupTimeouts, PostgresqlBaseBackupTimeoutsArgs
- Create string
- Create string
- create string
- create String
- create string
- create str
- create String
Import
PostgreSQL base backup can be imported using the dBInstanceId#baseBackupId, e.g.
$ pulumi import tencentcloud:index/postgresqlBaseBackup:PostgresqlBaseBackup example postgres-ckwcgdf1#bac3d001-5160-5077-9139-49c1310e0854
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
published on Monday, May 11, 2026 by tencentcloudstack
